Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Behind The Checkout - Only fire conversion scripts / pixels on first visit to the Order Status page
{% if first_time_accessed %}
<!-- Scripts you only want to run on first checkout confirmation -->
<!-- An example tracking pixel - be sure to remove this when copying this example -->
<img src="{{ total_price | money_without_currency }}&amp;order-id={{ order_number }}&amp;currency={{ currency }}" height="1" width="1" />
{% else %}
<!-- Scripts you want to run on every visit to confirmation page -->
<!-- (like when a customer clicks the "View Order Status" button in their confirmation email) -->
<!-- It's possible that this section remains blank, but I would leave the above comment as context for future Marketers / developers -->
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment