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 help with tagging your Shopify store for remarketing, visit Google support.

Create new remarketing lists in Google AdWords

To learn how to create remarketing lists in Google AdWords, visit Google support.

Add remarketing lists to your ad groups

When you have some lists created, tested, and tweaked, you can connect them to 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