akshay bhange
akshay bhange

Reputation: 2504

Shopify script runs on page reload

I've added an Analytics event trigger on the thank you page, The Code is working correctly & event is flowing to the dashboard. When the user reloads the thank you page, the event gets fired again.

Found this article on shopify site. but this code is not working: https://help.shopify.com/en/manual/orders/status-tracking/customize-order-status/first-time-accessed

Code snippet I'm using right now is.

<script>
//my analytics data send which captures data from order object 
</script>

I tried this variation but first_time_accessed returns empty value.

{% if first_time_accessed %}
<script>
//my analytics data send which captures data from order object 
</script>
{% endif %}

Upvotes: 0

Views: 163

Answers (0)

Related Questions