This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for variant in product.variants %} | |
_etmc.push(["updateItem", | |
{ | |
"item": "{{ product.handle }}", | |
"unique_id": "{{ variant.sku }}", | |
"name": "{{ product.title }}", | |
"url": "https://yourstoredomain{{ product.url }}?variant={{ variant.id }}", | |
"item_type": "product", | |
"available": "{% if product.available == true %}Y{% else %}N{% endif %}", | |
"image_url": "https:{{ product | img_url: "medium" }}", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
var _etmc = _etmc || []; | |
document.querySelector('.product-form__cart-submit').addEventListener('click',function () { | |
_etmc.push(["setOrgId", "MID"]); | |
_etmc.push(["trackCart", { "cart": [ | |
{"item" : "{{ product.handle }}", "quantity": "{{ 1 }}", "price" : "{{ product.price | money_without_currency }}", "unique_id" : "{{ product.selected_or_first_available_variant.sku }}" }, | |
{%- for item in cart.items -%} | |
{"item" : "{{ item.product.handle }}", "quantity": "{{ item.quantity }}", "price" : "{{ item.product.price | money_without_currency }}", "unique_id" : "{{ item.sku }}" }, | |
{% endfor %} | |
]}]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
_etmc.push(["setOrgId", "MID"]); | |
_etmc.push(["trackCart", { "cart": [ | |
{%- for item in cart.items -%} | |
{"item" : "{{ item.product.handle }}", "quantity": "{{ item.quantity }}", "price" : "{{ item.product.price | money_without_currency }}", "unique_id" : "{{ item.sku }}" }, | |
{% endfor %}] | |
}]); | |
</script> | |
{% if cart.item_count == 0 %} | |
<script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" src="//MID.collect.igodigital.com/collect.js"></script> | |
{% if first_time_accessed %} | |
<script> | |
_etmc.push(["setOrgId", "MID"]); | |
_etmc.push(["trackConversion", { "cart": [ | |
{%- for line_item in order.line_items -%}{"item" : "{{ line_item.product.handle }}", "quantity": "{{ line_item.quantity }}", "price" : "{{ line_item.product.price | money_without_currency}}", "unique_id" : "{{ line_item.sku }}" },{% endfor %} | |
]}]); | |
</script> | |
{% endif %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
_etmc.push(["setOrgId", "MID"]); | |
_etmc.push(["trackPageView", { "search" : "{{ search.terms }}" }]); | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
_etmc.push(["setOrgId", "MID"]); | |
_etmc.push(["trackPageView", { "category" : "{{ collection.title }}" }]); | |
</script> |
OlderNewer