{% unset_client %}

Removes custom properties from the user client.

Syntax

{% unset_client [property1] [property2] [etc...] %}

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

If no properties are specified, then ALL custom properties will be unset from the client

Examples

Unset client if do not track is present

Copy
{% if client_permissions.do_not_track %} {% unset_client %} {% endif %}

Unset specific client properties

Copy
{% if request.query_params.reset_counters == "true" %} {% unset_client login_counter error_counter home_counter work_counter kitchen_counter %} {% endif %}

Unset client properties dynamically with reference variable

Copy
{% var props = request.query_params.clearprops | split: ',' %} {% for prop in props %} {% unset_client &prop %} {% endfor %}