Skip to content

Instantly share code, notes, and snippets.

<script>
window.dataLayer = window.dataLayer || [];
function orderStatus() {
return window.dataLayer.push({
event : 'orderStatus',
totalSpent: "{{ customer.total_spent | times: 0.01 }}",
allOrdersCount: "{{ customer.orders_count }}",
lastOrder: '{{ customer.last_order.created_at | date: "%B %d, %Y" }}'
});}
{% if first_time_accessed %}
@matthew6688
matthew6688 / gist:a40f7d43d954db01f10625d4fa312165
Last active July 30, 2018 12:32
No Shopping cart is created equal
<script>
//=======================================================
//
// More Awesome scripts and tricks about shopify on www.connectdots.co
//=======================================================
// IMPORTANT: Change this value to whatever the ID of your
// GTM container is.
const GTM_CONTAINER_ID = 'GTM-XXXXXXX';
@matthew6688
matthew6688 / Connect shopify with Google Tag Manager
Last active June 22, 2018 11:26
Connect Shopify with Google Tag Manager
<script>
//=======================================================
//
// More Awesome scripts and tricks about shopify on www.connectdots.co
//=======================================================
// IMPORTANT: Change this value to whatever the ID of your
// GTM container is.
const GTM_CONTAINER_ID = 'GTM-MFNSHGD';