How To: Install Google Analytics Dynamic Remarketing on Shopify

Intro to Installing Dynamic Remarketing on Shopify

Before we get started, let’s make one thing clear: The instructions below are only applicable to those of you wanting to set up Dynamic Remarketing through Google Analytics (GA).

Before We Begin

As with any Remarketing Campaign, make sure the following steps are completed before you continue:

  • Enable “Remarketing” and “Advertising Reporting Features” in Analytics
  • Link your AdWords and Analytics accounts
  • Link your AdWords and Google Merchant Center accounts if you’re in the Retail vertical

 

Once you have completed the above steps, you’re ready to get started with the fun stuff!

Next, Create Custom Dimensions in Google Analytics

Next, you will want to create custom dimensions in Analytics using the attributes for your specific vertical. In our example, we are working with the Retail vertical, but you can find a complete list of verticals and attributes here.

Google Analytics Custom Dimensions

Add Custom Dimensions to Your Shopify Site

You’ll want to make sure that these dimensions are added to the code of your Shopify site. This ensures that when potential customers are served your Remarketing ad, they will be shown the exact products that they viewed on your site.

If you’re in the US, you shouldn’t need to change any part of the following code, however, if you’re in the UK, you will need to replace “US” with “GB.”

Shopify Dynamic Remarketing Attributes

 

 

 

Now the big question: Where to paste it. Intuitively, you would think it would naturally go in the “Add Custom JavaScript to Analytics” box on your store preferences page. We tried that too, but quickly found that the custom dimensions were not populating in Google Analytics. To get everything running nice and smooth, you will want to follow these steps:

  1. In your Shopify dashboard, select “Online Store”
  2. In the themes tab, click the box of 3 dots in the top right corner
  3. Select “Edit HTML/CSS”
  4. Click theme.liquid in the Layout folder
  5. Scroll to the very bottom and paste your code directly after the closing body tag

Where to Paste Code in Shopify

Congratulations! You’re just about ready to start showing all of your competitors what a digital marketing wizard you are.

Create a New Dynamic Attribute in Analytics

Assuming you already have your Remarketing audiences set up in Google Analytics (if not, learn how to set up Remarketing Audiences here) the last step is to create a new Dynamic Attribute in Analytics based on your business type.

To do this, go to the Admin tab of Analytics, under Property, select ‘Audience Definitions’ then ‘Dynamic Attributes.’ Here you will click “+New Attribute” and select your vertical. For Retail, you will want it to look like this:

Dynamic Attributes

Once you have completed this step, click save, and you’re all done! Go ahead and start building out your Dynamic Remarketing campaign in AdWords and watch the revenue pour in. Sit back and relax, you’ve earned it champ.

If you get stuck…

If you’d rather get pro help with your Product Listing Ads Management, think about reaching out to Tastyplacement; we offer these services. Not convinced of our awesomeness? Check out our PPC case study, and you will be.

12 replies
  1. AGUAWeb says:

    I just created an eCommerce website in shopify and would like to add dynamic re-marketing tag but I was facing some issues. I read this post and I succeed in the process. Keep sharing and Thanks :)

    Reply
  2. jpdupere says:

    Thanks for the post, it helped me a lot in setting up remarketing with analytics in shopify. There is still one issue that I encountered. GA custom dimensions can only be sent with an event or a hit of some sort. And sometimes (most of the times in my case) the GA code seems to be loading before the code for setting dimensions, hence the dimensions are not sent and my Adwords account complains about that.

    Reply
  3. Adam says:

    First of all, thank you for this tutorial. I’m confused, however. Once I go to create my campaign it requires me to link my Google Merchant Center account. How do these dynamic attributes work with GMC?

    Reply
  4. Zachary says:

    I’m working on setting up dynamic remarketing capabilities in AdWords and Analytics as well, and this post was exactly what I needed to fill in some missing knowledge gaps. THANK YOU SO MUCH for posting this!

    Reply
  5. Jay Sin says:

    I pasted the code above, but I don’t see any Remarketing tag being fired in the Tag Manager. Only the GA tag is being fired. Is there a way to see what values are being passed to Adwords ?

    Reply
  6. David says:

    I know this is old, but I am wondering about (non-dynamic) remarketing. I want it set up through Google Analytics, but the Google Tag Assistant doesn’t show a remarketing tag firing and Adwords says it hasn’t detected the Google Analytics functionality on your website.

    I have the settings toggled on inside data collection. Is there something that needs to be pasted inside the Shopify code? In their docs I only found them talking about adding the Adwords remarketing tag, but I have another site that isn’t shopify and Analytics RM will work without adding the Adwords tag.

    Any insight would be appreciated.

    Reply
    • Michael David says:

      In your case, there is no specific remarketing code required to be installed on your site–if you are using the new version of the Analytics code (you most likely are), then Google Analytics is collecting your audience information automatically. I know this part gets confusing. Sorry I did not see your question earlier, but there are thousands of spam comments in here to filter through. You need to check the Admin area of Analytics and then look for “Audience Definitions”, and then “Audiences”. This will show if you have actual audiences populated. Once you do, you can begin remarketing to these audiences.

      Reply
  7. matija says:

    Hello,

    Thanks for the awesome article. In this case I wanted to check if only the FIRST variant ID is sent to Analytics?

    If yes, do you know if its possible to set it so just to variant ID, depending on which variant page the user lands on?

    thanks
    m

    Reply
  8. Will says:

    Does this method still work for Google Analytics Dynamic Remarketing on Shopify?

    Also, will this method not track the checkout pages and the purchase page?

    I have GA installed via the standard Shopify help page recommendation and am not on Shopify Plus.

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *