How to add Google Dynamic Remarketing code in Shopify

Shopify Partner
51 1 4

Thanks Thrivous. I've updated my code (on github) to reflect this change. Good catch!

https://github.com/Czarto/ShopifyScripts/blob/master/snippets/adwords-remarketing.liquid

Digital Marketing @ Manitobah.ca | Pendleton.ca | Aigle.ca
0 Likes
Shopify Partner
51 1 4

Hi Daniel,

It looks like you are missing an opening <SCRIPT> tag. If you do a viewsource on your homepage, you'll see at about line 1515 that there is no opening SCRIPT tag right before

<!-- Google Code for Remarketing Tag -->

Check your code to make sure that you didn't miss a line when copy/pasting, or that you didn't forget to close any liquid tags that might be causing the script tag to go missing...

Hope this helps!

Digital Marketing @ Manitobah.ca | Pendleton.ca | Aigle.ca
0 Likes
Highlighted
Tourist
29 0 3

Thanks Alex,

I think I have implimented what you and Thrivous suggested (assuming Thrivous's post was directed at me). Using tag assistant on hrome I'm now getting an error for the home page only that says "Some products could not be validated" this is super wierd as the tags are all ok (Green) on the "Products" page from my nav bar - its just the home/landing page where it isnt happy.

I may have done somthing wrong as I'm pretty new to this! Do you have any thoughts?

Cheers,
Dan  

0 Likes
Excursionist
96 0 6

Hi Alex

Wow this was tricky!

I hope I have set it correctly up for my shop now because AdWords reports errors - can you verify on e.g. this product with Google Tag Assistant?

https://www.authentic.dk/collections/nexo-danmark/products/charles-brown

I think the price is wrong?

In DKK it is 695 - but the value is set to 69500 as I see it?

ecomm_totalvalue: 69500

Another product - this one:

https://www.authentic.dk/collections/vejrhoj/products/nautic-58-north-ebony

Here the value should be DKK 2795 but it is also wrong

ecomm_totalvalue: 2.79500

On the shop I use . as thousands delimiter and , as the decimal delimeter as this is Danish standard.

Google Adwords finds a bunch of errors which the Tag Assistant doesn't find:

We found the custom parameter "ecomm-prodid" in very few pages.

Top 500 pages with missing prodID includes some products where I cannot see the prodID is missing - e.g. this one:
https://www.authentic.dk/collections/dameure/products/nautic-62-north-zebrawood

(total of 47 pages withoiut prodID it reports)

This is also reported an error by Adwords:

Some values for the custom parameter "ecomm_pagetype" are missing
The tag is not passing all required values for "ecomm_pagetype".

Top 10 values for "ecomm_pagetype"
product
category
collection

 

I hope you can help sort it out so I can get my dynamic remarketing working :)

Regards,

Kenneth

Owner @ https://en.authentic.dk
0 Likes
Excursionist
18 0 5

Alex,

Maybe a stupid question, but do you need to have products loaded into Google Merchant Center to make Dynamic Remarketing work? Your blog post states one issue as Products not properly uploaded to Google Merchant Center.  

0 Likes
Shopify Partner
51 1 4

Hi Kenneth,

Sorry for the late reply.

Appologies -- it seems my code is very North American centric.

Google is expecting a "javascript number" as the value for ecomm_totalvalue, To fix the pricing issue, you would need to replace any line that looks like this:

ecomm_totalvalue: {{ total_price | money_without_currency | remove: ',' }}

With 

ecomm_totalvalue: {{ total_price | money_without_currency | remove: '.' | replace: ',' , '.' }}

(This removes all period separators, and then replaces the remaining comma as the cents separator with a period). Remember to fix this on the checkout page too.

For the issue with prodID not showing, this is probably related to the above issue (products with strange currency values are probably being rejected). So try it with the code above and give google a few days to update and see if things get better?

For the page type, I think you just need to wait a while longer? Are you still seeing this error?

Hope this helps.

Best,

Alex

Digital Marketing @ Manitobah.ca | Pendleton.ca | Aigle.ca
0 Likes
Shopify Partner
51 1 4

Hi Tmpulido,

Yes, you need to have products properly uploaded to Google Merchant center for this to work. You can either get this setup using Shopify's Google Shopping app or by following this writeup: Shopify DIY Google Shopping Feed

Best,

Alex

Digital Marketing @ Manitobah.ca | Pendleton.ca | Aigle.ca
0 Likes
New Member
4 0 0

Hi I am using the Google Shopping app to sync the product feed to Google merchant center. 

Do I need to add the feed before I can use the Google dynamic remarketing? And does anyone have a 

setup guide on hand?

Thanks!

 

Proson

 

0 Likes
New Member
1 0 0

Hi Daniel,

I am having similar error to yours on the homepage of my store . "Some products could not be validated" in the tag assistant. 

Were you able to fix the issue?. If yes then, It will be great if you can share it. 

Thanks

0 Likes
Tourist
9 0 1

After hours trying to solve this issue by myself, I found out about this app which seems to do the trick + plus it also creates your remarketing campaings - category viewers, product viewers and cart abandoners. I had a little problem signing up with my Google account by the support was super helpful. Yeah and I almost forgot the app's free :)

0 Likes