Google remarketing and Shopify

Shopify supports Google remarketing and dynamic remarketing. Google remarketing and dynamic remarketing are useful tools for bringing previous customers back to your store. Remarketing helps you target ads to people who visited your store in the past. Dynamic remarketing targets ads to your store's visitors based on the specific products they viewed on your site.

The majority of the setup for remarketing and dynamic remarketing is done through your Google AdWords account. Google support offers setup guides for both remarketing and dynamic remarketing. For help adding a remarketing tag to your Shopify store, and for more examples of remarketing setup, see below.

If you've already added your Google Analytics account number to the Preferences page of your shop, then the Google Analytics code on your Shopify store is up to date.


To create either a remarketing or a dynamic remarketing campaign, you need to have both a Google Analytics account, as well as a Google AdWords account. You also need to 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.

Add 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.

  1. Find the theme you want to edit, and then click Actions > Edit code.

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

  3. Scroll down to the bottom of the template.

    Google remarketing 1

  4. Paste the code on a blank line just above the </body> HTML tag.

    Google remarketing 2

  5. Click Save. If you use a Shopify theme other than Narrative, then you are done. If you use Narrative, then complete step 14.

  6. If you use the Narrative theme, then you will need to add some CSS to prevent the Google remarketing code from affecting the formatting of your website:

    1. In the Assets directory, click theme.scss.liquid.
    2. At the bottom of the file, paste the following code:

      iframe[name="google_conversion_frame"] {
    3. Click Save.


    For more assistance with tagging your Shopify store for remarketing, visit Google support.

Create new remarketing lists 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.


For more assistance with creating new remarketing lists in Google AdWords, visit Google support.

Optional: Create new remarketing lists 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, then 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, then 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.

Add 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