Hi I’d like to know how to retrieve the user session ID via liquid or Admin GraphQL/REST API.
Upon creating a AB testing app, I’m creating a logic that determines if the user sees page A or the user sees page B.
I understand that the customer_id is only approachable when a user is logged in, so I need some identifier for the session(user).
The logic I want to create is something like this. (What I am missing: user_session_id)
{% if user_session_id % 2 == 0 %}
{% assign ab_pattern = "A" %}
{% else %}
{% assign ab_pattern = "B" %}
{% endif %}
{% if ab_pattern == "A" %}
<div> Pattern A liquid code </div>
{% elsif ab_pattern == "B" %}
<div> Pattern B liquid code </div>
{% else %}
<div> liquid code for error handling </div>
{% endif %}