Google remarketing and Shopify

Shopify is now set up to natively work with Google Remarketing. If you've already added your Google Analytics account number to the General Settings page of your shop then we've already updated the Google Analytics code on your Shopify store.


To create a Google remarketing campaign, you must have both a Google Analytics account, as well as a Google Adwords account. You must also Have both of these accounts linked together.

When you have a remarketing list of 100 people or more and your Google accounts are configured, you'll need to add some code to your theme.liquid, located in your Edit HTML/CSS page.

Adding the Remarketing tag to your Shopify store

From your Adwords account:

  1. Click Campaigns.

  2. Click Create your first campaign.

  3. Click the Shared Library option on the left hand sidebar.

  4. In the Audiences section, click View.

  5. Click the Set up remarketing button. You will then be given a block of code.

  6. Enter your email address to receive an email that contains code for you to add to your theme.liquid template on Shopify.

    Google remarketing x1

  7. When you receive the code, copy it.

  8. From your Shopify admin, click Online Store, and then click Themes (or press G W T).

  9. Find the theme you want to edit, click the ... button, and then click Edit HTML/CSS.

  10. Click theme.liquid to open it in the editor.

  11. Scroll down to the bottom of the template.

    Google remarketing 1

  12. paste the code on a blank line just above the </body> HTML tag.

    Google remarketing 2

  13. Click Save.

Creating a New Remarketing List in Google Adwords

From the Audiences page in Google Adwords, click New audience and choose Remarketing list.

From here you have several choices on how to set up a list that focuses on specific visitors. An example would be to target users who viewed your website but didn't check out.

To set this up, enter the URL:


Set the condition to does not contain. If this all sounds new to you, you can learn more about the checkout URL structure in our Google Analytics, Goals and Funnels guide here.

Google remarketing 3

Click Save.

Optional: Creating a New Remarketing List in Google Analytics

If you prefer setting most of this up in your Google Analytics account you can create Remarketing lists in your Analytics account which will then show up in your Adwords account on the Campaigns > Shared library > Audiences page.


If you have not already, you should add the remarking code to your Shopify store.

From your AdWords account:

  1. Click the Tools menu at the top.

  2. Select Google Analytics.

  3. In the header click Admin.

  4. Select the Analytics account for the shop you want to connect to your Adwords account for remarketing purposes.

    Google remarketing x1

    If you have already linked your Analytics and AdWords accounts, skip to step 8.

    To link your AdWords and Analytics accounts:

  5. Under the header PRODUCT LINKING, click AdWords Linking.

    Google remarketing x2
  6. Choose a Link group title, and select a Linked view, for example All Web Site Data:

    Google remarketing x3
  7. Click Link Accounts.

  8. Click Remarketing, then Audiences under the Remarketing header.

    Google remarketing x6
  9. Under the header Create a Remarketing audience in Analytics, click Get started.

    Google remarketing x4
  10. Select a View, an Advertising account, and click Next step:

    Google remarketing x5
  11. Click Enable.

Now you can Define Audience to choose who will receive your remarketing ads.

Example of Remarketing list in Analytics

If you're familiar with Goals and Funnels in Google Analytics, then using Goals is the easiest way to set these targets.

I want to target people who visited my website and did not purchase

To do this, I am going to be using Goals created in my Analytics account. In this example I am using the goal we demonstrated in the Goals and Funnels article and calling it "Sale made".

Now you can create the Remarketing list. For the "Remarketing Type" option you can select "Create my own remarketing type using Visitor Segments", by clicking on "+ Add new filter" and choosing "Dimension & Metric Filter"

For the first option I'm choosing the goal I created and setting the condition to ‘Greater than 0’. Then I'm setting the "Include" option to "Exclude". Next I'm adding an "AND" statement and choosing "Pageviews" Greater than 0.

Google remarketing 5

This should give us a list of everyone who visited the site but didn't check out.

Adding your remarketing lists to your ad groups

Once you've got some lists created and you've tested and tweaked them, you'll then probably want to connect them to some advertisements. Click here to learn how.

More reading material from Google

Want to dive deeper into the benefits and best practices of Google Remarketing? Here are some resources for you:

Want to discuss this page?

Visit the Shopify Community

Ready to start selling online with Shopify?

Try it free