Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
<!-- Custom Facebook Variant Remarketing Code -->
{% comment %}
Include this file at the bottom of your product page template.
{% endcomment %}
<script type="text/javascript">
$( document ).ready(function() {
if( fbq ) {
fbq("track", "ViewContent", {
content_name: "{{ product.title }}",
content_category: "{{ product.type }}",
value: {{ product.price | money_without_currency | remove: ',' }},
currency: "{{ shop.currency }}",
content_ids: [{{ product.selected_or_first_available_variant.id }}],
content_type: "product"
});
// Attache add to cart event
$( "#AddToCart" ).click(function() {
fbq("track", "AddToCart", {
content_name: "{{ product.title }}",
content_category: "{{ product.type }}",
value: {{ product.price | money_without_currency | remove: ',' }},
currency: "{{ shop.currency }}",
content_ids: [{{ product.selected_or_first_available_variant.id }}],
content_type: "product"
});
});
}
});
</script>