Google Shopping is dynamite for eCommerce. For many Shopify stores its their top performing traffic source. However if you’re running Shopping and not running dynamic remarketing… you’re missing out!
You spend great deals of money getting customers to your store in the first place, and should they not purchase from your store immediately (maybe they need time to think about the purchase), that’s potentially wasted spend.
But with dynamic remarketing you can show them customised ads as they browse the net, keeping your brand and product at the forefront of their thoughts (unless they’re using ad block!).
These ads are waaaay better than standard remarketing… because they show products your potential customer is actually interested in.
Great! I want more sales… So how do I set up AdWords dynamic remarketing?
In the below video I cover the ins and outs for those with a Shopify store:
At about 3 minutes I talk about inserting liquid variables into the remarketing code to make it work. Below is the most up to date code snippet I’m using. Add it to your template.liquid file only:
{% comment %} Instructions on using the code. Firstly, all the code can be pasted into an empty section at the bottom of your template.liquid file. Secondly, in the line below, where it shows google_conversion_id = 0, delete the 0 and add your conversion id (found in AdWords) {% endcomment %} {% assign google_conversion_id = 0 %} {% assign shopify_store_country = 'US' %} {% if shop.currency == 'CAD' %} {% assign shopify_store_country = 'CA' %} {% elsif shop.currency == 'GBP' %} {% assign shopify_store_country = 'GB' %} {% endif %} <script type="text/javascript"> {% if template contains 'cart' %} var google_tag_params = { ecomm_prodid: [{% for item in cart.items %}'shopify_{{ shopify_store_country }}_{{ item.product.id }}_{{ item.variant.id }}'{% unless forloop.last %}, {% endunless %}{% endfor %}], ecomm_pagetype: 'cart', ecomm_totalvalue: {{ cart.total_price | money_without_currency | remove: ',' }} }; {% elsif template contains 'collection' %} var google_tag_params = { ecomm_prodid: [{% for item in collection.products limit:5 %}'shopify_{{ shopify_store_country }}_{{ item.id }}_{{ item.variants.first.id }}'{% unless forloop.last %}, {% endunless %}{% endfor %}], ecomm_pagetype: 'category', ecomm_category: '{{ collection.handle }}' }; {% elsif template contains 'index' %} var google_tag_params = { ecomm_pagetype: 'home' }; {% elsif template contains 'product' %} var google_tag_params = { ecomm_prodid: 'shopify_{{ shopify_store_country }}_{{ product.id }}_{{ product.selected_or_first_available_variant.id }}', ecomm_pagetype: 'product', ecomm_totalvalue: {{ product.selected_or_first_available_variant.price | money_without_currency | remove: ',' }} }; {% elsif template contains 'search' %} var google_tag_params = { ecomm_prodid: [{% for item in search.results limit:5 %}'shopify_{{ shopify_store_country }}_{{ item.id }}_{{ item.variants.first.id }}'{% unless forloop.last %}, {% endunless %}{% endfor %}], ecomm_pagetype: 'searchresults' }; {% else %} var google_tag_params = { ecomm_pagetype: 'other' }; {% endif %} /* <![CDATA[ */ var google_conversion_id = {{ google_conversion_id }}; var google_custom_params = window.google_tag_params; var google_remarketing_only = true; /* ]]> */ </script> <script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"> </script> <noscript> <div style="display:inline;"> <img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/{{ google_conversion_id }}/?value=0&guid=ON&script=0"/> </div> </noscript>
You’ll notice above that if you’re using the Google Shopping App the ecomm_prodid changes based upon the stores location. If you’re running a store in a geography not mentioned above, you can get the two letter country code from the product id in merchant centre.
For the payment confirmation page URL use
thank_you
I hope that helps, and all makes sense. Should you have any questions, leave me a comment or get in touch.
Edit: I’ve noticed from the comments that some people are mixing up AdWords Dynamic Remarketing (which I’m teaching above) with Google Analytics Dynamic Remarketing. Google Analytics is a different thing, that requires a different setup. If you see something like this, ignore it:
It requires code like the below (amongst other things):
Google Analytics Dynamic Remarketing is more powerful though.
With AdWords, your targeting is limit to URLs. With Analytics, you can target by anything you can create a segment for, including demographics.
Small to medium size sites don’t really need the functionality… there’s arguably not enough traffic to make it worthwhile.
But large ones site could utilise it. Perhaps I’ll do a post on it at a later date.
Edit: If you’d like help getting this setup, see the work with me page.
Axlo says
Great artricle! We’re using product SKU as product id in merchant. How we can let it use the SKU instead of the ID? Tried Product.sku, not working…
John King says
Hi. Yes you will need to use Shopify’s liquid variables to pull the SKU.
Rather than use product, they seem to have SKU nested under variant. See here:
https://help.shopify.com/themes/liquid/objects/variant#variant-sku
Axlo says
Thanks! I’ve tried but in the Tag Assistant the ecom prodid is empty…
Mateo Salazar says
Great post! quick question what can i do if my products are not loading when creating the ad? how can i fix this?
thanks
John King says
Hi Mateo, I’ve come across this issue a few times with Google Chrome. And simply trying the ad creation process through another browser (even sometimes different Chrome profile) has let the product images load.
Jinal Shah says
https://uploads.disquscdn.com/images/6408352b272da44895691df15316110db908ef47a078a9cecf95cf5714d10537.jpg Hi John,
I inserted the code snippet ” Shopify google shopping app (USA)”, however in the adwords getting errors. Would you be able to help me sort these?
Eric Harkins says
Hi John, can you please check my code. I saved it in theme liquid before the tag but when I use the chrome tag assistant to confirm it’s working, it doesn’t register my remarketing tag.
var google_tag_params = {
ecomm_prodid: shopify_AU_{{ product.id }}_{{ product.variants.first.id }}
ecomm_pagetype: {{ template }}
ecomm_totalvalue: {{ product.price_min | money_without_currency }}
};
/* */
//www.googleadservices.com/pagead/conversion.js
David Andrews says
Doesn’t seem to capture Order Value while on the cart pages, during checkout, or upon purchase completion. :/ Captures individual product pages though. Also doesn’t seem to update audience sizes. :/
John King says
It only needs to capture product values on the product page. The rest you mentioned above wouldn’t have any value for the AdWords system. You may be thinking of the way Facebook works, which is different.
Audience size takes a while to update (days). If it doesn’t update after some time, then likely there’s an implementation problem.
Yatin Singal says
Hello John, thanks a lot for this great video. I am almost all set-up. Just getting this last error in my Display Network tab in Adwords – ‘None of your tag’s activity uses “ecomm_prodid” (Without this parameter, your dynamic ads won’t be tailored to visitors’ activity on your website.)’
Any ideas? I believe this is the last error following which my Adwords Dynamic remarketing campaign should work….Thanks in advance
Yatin Singal says
Hello, this is working perfectly on all my product pages, however I have 2 issues:
1. When I use Google Tag Assistant it is still showing me a yellow error ‘Tag Parameter could not be parsed’. This is happening on all pages except the individual product pages itself where all of the validation works as described in the post above.
2. I had first attempted GA remarketing but after getting stuck there, then moved to Adwords remarketing tag. Now I am a little confused as to which tag is actually working and if I have tag duplication. In Google Adwords>Shared Library>Audience I am seeing ‘AdWords tag last active’ and ‘Google Analytics tag last active’ but my remarketing lists are not getting populated even though there is traffic on the website.
Could someone please help? Thanks.
Simon Rad says
Hey John, How Can I made a dynamic retargeting ad if i use shopifys google shopping app – and shopify just pushes the products so the show up in merchant centers lists but not feed. In short – I have no feed to select.
Joanna L Walters says
Hi John! Thank you for this video :) I’m having a couple of issues — the first being that when I go to validate the code, the tag assistant is showing the remarketing tag as green, but isn’t showing the “request” below to click on in order to validate, It’s only showing the following 3 tabs: Metadata Code Snippet and URLs. Is everything ok here?
Alex Czarto says
This is resurrecting an old post, but I thought this might be of value:
Here is a shopify liquid snippet to include on all your site pages to get dynamic remarketing working correctly:
https://github.com/Czarto/ShopifyScripts/blob/master/snippets/adwords-remarketing.liquid
And here is the code to add to your checkout page:
https://github.com/Czarto/ShopifyScripts/blob/master/settings/checkout/adwords-remarketing.liquid
And here is a writeup on how to create a custom XML feed template for Google Merchant that will include all your product variants (if you sell products with multiple variants of different color, the Shopify Shopping App will often only publish the first variant):
https://business.czarto.com/2016/06/14/shopify-google-shopping-feed/
Hope this is useful.
Best,
Alex
Yatin Singal says
Hi Alex, thanks a lot for these resources. I was having some issues with Dynamic Remarketing with the error (None of your tag’s activity uses “ecomm_prodid”). I am an absolute newbie when it comes to coding but your code language seems to better match the templates I have on my theme. So, I have just set-up based on the codes you provided here. Let’s see..will let you know the results.
FloBorg says
I can confirm that this is the one that Google specialist are using for Shopify as one of them did it for us today :): thanks!
Emma says
Hi Alex,
How do i apply the code for countries like AustriaBelgiumSpain? they are all under EUR.
Thanks,
Emma
John King says
Hey Alex, thanks for the share. Good snippet of code..
Noticed it loops all the products on the collection page and fires them to Google.
Unsure if that is the best move, given that the page could contain a lot of products, and ideally we only want to pass Google products that the customer is explicitely interested in. The risk, if I understand correctly, is that Google then remarkets random products from collection pages that the user isn’t interested in.
Does this fit with your understanding?
Jason Hales says
A really great post thanks. Despite following all the trouble shooting below I’m still getting this error . Tag Paramater object could not be parsed. (error in yellow). I have done the following advice…
Try using this piece of liquid code for the ecomm_totalvalue:
{{ product.price_min | money_without_currency | remove: ‘,’ }}
Any other suggestions please?
Benjamin Smith says
Same. Plus in AdWords I’m still seeing ‘We haven’t detected custom parameters for Retail (AdWords)’
Any ideas John?
John King says
Possibly some of that syntax is broken from copy and pasting. Try re-typing the quotation marks.
Regarding the “we haven’t detected custom parameters’.
Check your product pages with tag assistant and make sure its showing the correct values.
Veena J says
Hi John,
Thank you so much for posting this guide. I followed your instructions in the video and the post above, but after 24 hours I’m still getting errors/warnings in my adwords account, but on my product pages everything is Ok according to the tag assistant extension. Please advise if you can.
See attachments https://uploads.disquscdn.com/images/b4ada81ce707b956b67bc2ce48b12eb1c613b4b134be528b536b90a44730de00.png
https://uploads.disquscdn.com/images/9c1d0479a7622588826cf100843d4754d543ae2408e98de82545565d5b06ce71.png
https://uploads.disquscdn.com/images/689f8bdcd7b27d68c8589b4a1cd211a904709bc276f816af14a3d0b33394a230.png
Andrew Wiggins says
I’m having this issue as well, any fixes?
Jonathan Hauerstock says
it doesn’t work. it doesn’t show my products at the end and it doesn’t validate it.
i tried everything. can i email you my screen prints? what do i do?
Garry Pickles says
Really good share and step by step process setting this up
Derek says
Hi John, any advise for countries which does not support Google Shopping? We still want to run dynamic product remarketing but we would need to manually upload to Adwords a product feed in .CSV format. Any idea how we can export the data from Shopify to a product feed format in CSV?
John King says
That’s cool to know its still possible without Google Shopping support.
Probably start by exporting your products in Shopify’s default format, then start tweaking the columns to fix Google’s requirements.
Jonathan Stephens says
Great video thanks. The Google Tag assistant cannot validate a product code. On further investigation the code is correct for the product on the page and within Google Merchant Centre. Any suggestions? Thanks http://www.gleamingmonkey.co.uk
zinyosrim says
Hi,
I followed the instructions from the video. for some reason my customer audience is not being populated.
The lists website visitors and email subscribers are ok.
I also have a correct working Facebook pixel in the checkout, which also collects data.
Any idea what’s wrong here?
Thanks
Zin
zinyosrim says
here’s the data from my checkout tag
zinyosrim says
Thanks, you saved my day
Fernando says
I have the same problem. How did you fix it?
Lewis Phillips says
Hi John,
Such a useful tutorial! I followed the video step by step but have got 2 errors and wondered if you could give me a bit of advise;
Error 1:
None of your tag’s activity uses “ecomm_prodid”
Without this parameter, your dynamic ads won’t be tailored to visitors’ activity on your website.
Error 2:
Your tag isn’t active
Conversions aren’t being tracked
Now strangely, I these errors wern’t there a few days ago but then they came back?
I was trying to set it all up without finidng this video so I think it might be a mistake I made further on?
I would really appreciate your advise dude!
Lewis
Yatin Singal says
Hi Lewis, I have the same error as your Error 1. Have you managed to fix it? How? Thanks.
Thanh Hong says
Dear Sir,
I cannot setup google shopping apps. i get error “http://prntscr.com/97vfz9” alway loading :(
So please help me.
Thank you
Regards,
Mary Butlin says
A very helpful video and post – thank you!
Bill Aug says
Great video John, we installed but are getting the following errors as well:
Custom parameter “ecomm_prodid” and Merchant Center feed values don’t match
and
Some values for the custom parameter “ecomm_pagetype” are missing
Any ideas? Seemes to be installed right and the tag assistant is showing the correct info. Minus an error that says “URL not parsable” Maybe you can help there too?
Bill says
Hey John, thank you for the awesome post! I am just getting this implemented and the tag assistant extention is giving me an error when I click requests that says “Url is not parsable” any ideas what is happeneing? I followed your instructions word for word. I am using the google shopping app in the US. Thanks!
dax says
Works great! John helped me troubleshoot a problem (unrelated to the tutorial) as well. Definitely knows what he’s doing!
Javier Diaz says
Hi,
First I wanted to thank you for uploading this video it made my life much easier. But I’m having a little issue with the google re-targeting code. On adwords it says I have a few errors:
1. Custom parameter “ecomm_prodid” and Merchant Center feed values don’t match
2.
Some values for the custom parameter “ecomm_pagetype” are missing
3.
Custom parameter “dynx_itemid + dynx_itemid2” and feed values don’t match
I will truly appreciate it if you can help me.
Thanks
John King says
Hi Javier.
Error 3 is related to Google Analytics Remarketing – so outside the scope of the above blog post. Its also unrelated to whether or not the above will work.
Error 2 – shouldn’t affect things too much.
Error 1 – That’s potentially an issue, as long as its in relation to AdWords remarketing and not Google Analytics remarketing.
If things still aren’t working, screenshot the error messages, upload them to something like Imgur, and paste the link as a reply.
Claus Lauter says
Thanks for this great post. Works all well, but I am getting this message in the Tag Manager: Number field should not be quoted: ‘ecomm_totalvalue’. Any ideas why this happens?
John King says
Hey Claus, thanks for dropping me the message. Always great to hear when something is of use. Yes – to fix the error you’re experiencing remove the quotes around the {{ product.price_min | money_without_currency }} tag.
You didn’t make a mistake, the quotes were on the sample code above, but I’ve since removed them so that error doesn’t happen for anyone else.
Abe Soskil says
Hi. I also had this error and fixed it by removing the quotes…. so the red error message in tag assistant is gone, but now i have a yellow error that says this:
Tag Paramater object could not be parsed.
Please advise and thank you for everything!
Ben says
Im having this same issue. It cant parse values that have a comma (,) in it. For example a value of 2,999 doesnt work but a value of 299 does work. Any ideas John?
John King says
Hi Ben,
Try using this piece of liquid code for the ecomm_totalvalue:
{{ product.price_min | money_without_currency | remove: ‘,’ }}
Ben says
Worked!! Ive been trying to figure this out for days. Thanks!!
Ray Wickham says
I used the above liquid code, which removed my red error, but now GIVES me the yellow error it was supposed to solve???
Rishi says
Great post John.
I’ve implemented the tag as suggested and the tag is working fine / being verified successfully by tag assistant, but something appears on all the product pages – “Default- Title : £XXX” and stops the functionality of adding the item to basket.
Have you come across this issue before?
John King says
Hey, I haven’t. Drop me an email/message with your site URL and I’ll take a look (if it would be of help).
Rishi says
Great – thanks John. Site is http://www.logic3.com
John King says
Hey Rishi, have you temporarily removed the code snippets? Can’t see the ecomm tags or the string you mentioned above in the source code.
goodsoup says
John,
Great article. I was able to successfully implement this on my Shopify site but having some issues on my cart page with the product ID’s that are in the cart. The code is showing ga(‘set’,’dimension1′,’shopify_US__’); instead of the expected ga(‘set’,’dimension1′,’shopify_US_334458735_821038511′);. Any idea why this is happening? Any advise would be appreciated.
Matt
John King says
Hi Matt, did you get this sorted?
The code you’re referencing relates to GA Dynamic remarketing (as far as I know?) rather than AdWords Dynamic Remarketing (which is what I was teaching in the video above).
Alberto says
Hi John,
Thanks for this video and article, it helped me a lot.
I just have one question, at the end you mention the thank you pages URLs, for what are those?
Cheers!
John King says
Hi Alberto.
Thanks for your message.
The thank-you page URLs are for identifying customers who have made purchases via your Shopify store.
As mentioned in the video, you can use them to create a new audience (call it ‘Customers’ or similar). Then setup a new custom audience and remove ‘Customers’ from your main audience. That way you avoid targeting people who have bought from you already.
Let me know if that helps answer your question?
Alberto says
Perfect!
Thanks
Adam Jetking says
Hi John..This is great post for all shopify owner who would like re-marketing.
But I set up Remarketing Campaign recently. All things set up, but I am getting error into Remarketing Tag field that
– Values for “ecomm_prodid” should match item identifiers in your Merchant Center feed.
I am using Google shopping Apps, So I don’t know exactly about feed.
I add this code into theme.liquid
var google_tag_params = {
ecomm_prodid: ‘shopify_US_{{ product.id }}_{{ product.variants.first.id }}’,
ecomm_pagetype: ‘{{ template }}’,
ecomm_totalvalue: ‘{{ product.price_min | money_without_currency }}’,
};
/* */
;
And getting error
Values for “ecomm_prodid” should match item identifiers in your Merchant Center feed.
Top 10 products that don’t match your Merchant Center feed
468879023
480006787
995250499
456630127
995629443
995348931
995434243
995379459
995579843
Can anyone help with this?
John King says
Hi Adam, thanks for your message.
In the video I mention using the Chrome extension ‘Google Tag Assistant’ to verify your tags.
When you run tag assistant on one of your product pages, does the ecomm_prodid match one that exists in your merchant centre?
(Just trying to ascertain where we are with the issue in order to suggest a fix).
dax says
I have the same problem actually.
I have custom product_ids in shopify.
Tag assistant works fine on a product page I’m validating, I’m using the Google shopping app as well on shopify- and google merchant center product_ids match the ones in adwords (shopify_GB_number_number).
The adwords- dynamic remarketing error appears to detect that there are shopify custom product_ids … and I guess they must get them from the shopping app. Not sure why, or how to fix though
John King says
Hey Dax. That’s interesting. Hard to diagnose without delving more into the nitty gritty. Maybe shoot me a link via email and I can look into it with you.
dax says
Problem solved with John’s help! Thanks :D
darqmatter says
Great Video… I just implemented all the code, and just created a new Dynamic remarketing campaign. I give you a heads up to let you know how everything worked out. Keep up the good work..
DM
John King says
Hey, that’s awesome. Great to hear you’ve got your remarketing campaign setup. And thank for the feedback. Let me know how you get on.