How to properly install Google Dynamic Shopping Remarketing?

New Member
3 0 0

Hi Josh

 

I deleted the last endif code and Ican save now. Going to see if it is working.

 

Also I already had tracking code set in checkout - additional script by this guide:

https://help.shopify.com/en/manual/promoting-marketing/analyze-marketing/tracking-adwords-conversion...

 

ga-snippet-setup-dynamic-value.png

 

Do I need to remove this code or just keep it together with your code?

 

Thanks

0 Likes

If that's a screenshot of your code, it won't work given it's the wrong Google Ads send_to variable (Shopify just provided an example). But yes, you don't want to double up on the conversion code.

Run Google Shopping ads? Get the free definitive guide to Google Shopping for Shopify (no optin required): https://www.digitaldarts.com.au/google-shopping
0 Likes
New Member
3 0 0

Hi Josh

 

It's the screenshot from the shopify guide I referred to :)

 

So I don't need this code if I'm doing dynamic remarketing with your code, right?

0 Likes

Yes, you don't need to double up on the conversion tracking code.

Run Google Shopping ads? Get the free definitive guide to Google Shopping for Shopify (no optin required): https://www.digitaldarts.com.au/google-shopping
0 Likes
Highlighted
New Member
1 0 0

Hi @Josh_Uebergang,

 

Thanks a lot for your guide, it's been incredible helpful. But i have some doubts:

1. Where can i check what my store is sending product ID to the merchant center (for ex. SKU or other)

2. Where in the code should i install the global tag?, i see in the guide you tell the code to be installed in the new snippet, but should also be wrote on the liquid theme, below <head>? And what would be specifically the Analytics Global tag for this?

 

Hope you can help me, thanks a lot.

0 Likes

Hi,

 

Please use this below code, I have corrected that, this will work :-

 

{% if template contains 'product' or template contains 'collection' or template contains 'index' or template contains 'search' or template contains 'cart' %}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-PROPERTY_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-136759308-1', {'send_page_view': false, 'custom_map': {'dimension1': 'Product SKU', 'dimension2': 'ecomm_pagetype', 'dimension3': 'ecomm_totalvalue'}});
gtag('config', 'AW-747247553');
</script>

<script>
gtag('event', 'page_view', {
'ecomm_pagetype': {% if template contains 'collection' %}category{% elsif template contains 'search' %}searchresults{% elsif template contains 'product' %}product{% elsif template contains 'cart' %}cart{% elsif template contains 'index' %}home{% endif %},
{% if template contains 'product' %}
'Product SKU': 'shopify_IN_{{ product.id }}_{% if product.variants.first.id %}{{ product.variants.first.id }},{% else %}{{ product.variants.id }}{% endif %}',
'ecomm_totalvalue': {{ product.price_min | money_without_currency | replace: ',', '.' }},
{% elsif template contains 'cart' %}
'ecomm_prodid': [{% for item in cart.items %}'shopify_US_{{ item.product_id }}_{{ item.variant_id }}'{% unless forloop.last %},{% endunless %}{% endfor %}],
'ecomm_totalvalue': {{ cart.total_price | money_without_currency | replace: ',', '.' }},
{% endif %}
'non_interaction': true
});
</script>
{% endif %}

 

For more details you can contact me on my email-id arpansrivastava@cedcommerce.com

Arpan Srivastava
Store Analyst

Skype id-live:danbakker_2
0 Likes