Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mattlebel/8d3db4c807334c61bed0558b85b723de to your computer and use it in GitHub Desktop.
Save mattlebel/8d3db4c807334c61bed0558b85b723de to your computer and use it in GitHub Desktop.
Behind The Checkout - Verifying Liquid tags on the Shopify Order Confirmation page (using an existing customer order)
{% if first_time_accessed %}
<!-- Scripts you only want to run on first checkout confirmation -->
<!-- The tracking pixel that we want to verify is outputting the correct information -->
<img src="https://www.tracking.com/pixel.gif?amount={{ 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 -->
<!--
Put the liquid tags that you want to verify in a div with a unique ID and display:none CSS rule
-->
<div id="search-for-me" style="display:none;">
{{ order_number }}
{{ total_price | money_without_currency }}
</div>
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment