{% set_client %}

Saves custom properties on the client that will survive across multiple sessions until they are changed, unset, or the "session" permission expires. Note that this doesn't mean anything unless the user (or the developer) has granted permission for sessions.

Syntax

{% set_client property1:value1 [property2:"value 2"] ... %}

You may also include reference variables as properties, which will be dereferenced to their property names before setting the client properties.

Examples

{% if request.query_params.hide_popup_for_all_time %}
    {% set_client show_popup:"false" %}
{% endif %}
{% if submission.is_valid %}
    {% var forms_submitted = client.submittedForms | to_int | plus: 1 %}
    {% var client_formname = form.name.value | prepend: 'submitted' %}
    {% set_client submittedForms:forms_submitted lastKnownEmail:submission.email &client_formname:'true' %}
{% endif %}

Developer Overview

Liquid Markup