This is your first visit

Delete cookie

Used code:


  {% if get_get('reset') %}
      {{ delete_cookie('first_visit') }}
      Cookie deleted
      <a href="?">Back</a>
  {% else %}

      {% set cookies = get_cookies() %}
      {% if cookies.first_visit %}
          Your first visit was on {{ cookies.first_visit }}
      {% else %}
          {{ set_cookie('first_visit', "now"|date("Y-m-d H:i:s")) }}
          This is your first visit
      {% endif %}

      <a href="?reset=1">Delete cookie</a>

  {% endif %}