How To: Install Google Analytics Dynamic Remarketing on Shopify

Intro to Installing Dymanic Remarketing on Shopify

Before we get started, let’s make one thing clear: The instructions below are only applicable for those of you wanting to set up Dynamic Remarketing through Google Analytics (GA).  If you’re trying to set up Dynamic Remarketing through AdWords for Shopify, check out the instructions in this article.

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.

1 reply
  1. AGUAWeb
    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 🙂


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 *