Add the remarketing tag to your site or mobile app

Before you can start showing ads to customers on a remarketing list, you'll need to paste the remarketing tag (small snippet of code) in all pages of your website or in your mobile app. When you create your first remarketing campaign for your website, you can email yourself or your webmaster the remarketing tag. You can find the code for your site or mobile app in your "Shared library".

How the remarketing tag works

  • Get one tag that you can use throughout your site or app.
    • For sites, you can place one tag in the footer of your site that will work on all pages. You can also paste the tag using a content management system. The remarketing tag works for visitors who come to your site using a desktop computer or a mobile device. You don't need to create a separate tag or list for mobile visitors to your site.
    • For mobile apps, you just need to select the appropriate operating system for your app when generating the tag and add the name of the screen the tag is implemented on.
  • Create as many lists as you want using rules, based on sections of your site or screens within your app. You don't need to create a separate tag for each list that you create. Categorising your visitors by creating more refined lists allows you to tailor your ads and set your bids better to optimise performance.

Keep in mind

Your remarketing tag shouldn't be associated with any personally identifiable or sensitive information. Sensitive categories of sites and apps can't use remarketing. If you're setting up a remarketing campaign and placing the remarketing tag on your site or mobile app, you need to follow the Policy for advertising based on interests and location.

Add the remarketing tag to your site

How to add the remarketing tag to your site

1. Get your remarketing tag code

If you didn't get the tag code via email when you set your remarketing campaign, you can still find it in your AdWords account. Just follow these steps:

  1. Sign in to AdWords at
  2. Go to your "Shared library".
  3. In the "Audiences" section, go to the "Remarketing tag" box at the top.
  4. Click the View tag details button and then click Set-up.
  5. Click View remarketing tag and instructions to get the remarketing code that you'll need to add to your site. If you use Google Analytics, you’ll have the option to use the tracking code that’s already on your site instead. To set this up, see these instructions.

For more detailed instructions, read Remarketing tag validations and alerts.

2. Add your remarketing tag code to your entire website

Copy the remarketing tag code and paste it at the bottom of all pages, before the closing "</body>" tag.

Once the tag has been published in your website, the next step is to create remarketing lists in AdWords. For example, you'll be able to create a remarketing list for the people who visited the "Electronics" section of your site by defining a list like this: "URL contains electronics".

Note: If you're setting up a dynamic remarketing campaign, you'll need to follow instructions for adding the dynamic remarketing tag to your site.


Add the remarketing tag to all pages of your site. You can then easily create lists for any pages without ever having to add more remarketing tags. If you can't add the tag to your entire site, you can still add it to specific sections of your site and then define lists for each of those sections based on their corresponding URLs.

How to check if your tag is working

You can find out if your tag is working correctly on the "Remarketing tag" box in the AdWords "Shared library". Keep in mind that there's a delay of 24-48 hours in the information that shows in the tag validation section. To see when your tag was last checked, follow these steps:

  1. Click Shared library in the side navigation bar.
  2. Click the View >> link under "Audiences".
  3. Click the View tag details button in the "Remarketing tag" box above the statistics table. At the bottom, you'll see the date when the information was last updated.
What to do if you have older tags on your site

If you already have one remarketing tag on all pages of your website, you don’t need to change anything. You can create new lists in AdWords based on your web page URLs.

If you have existing tags on a few pages of your site, follow the instructions below on how to make changes to the code or replace your existing tags to start taking full advantage of AdWords remarketing.

Existing remarketing tags on certain sections of your site

You can start to create new URL-based lists for the pages where a remarketing tag is already present. Creating a wider variety of lists can help you improve your ad performance through the creation of individual campaigns tailored to each of the associated audiences. If you have the remarketing tag in all pages of your website, you’ll be able to create lists from all site sections easily, which will give you more flexibility. There are two ways to do this:

  • Adding a tag on pages with existing tags: You can just place the new tag on all your site pages, without changing any of the existing tags. This is the easiest way to get started. However, removing older tags after implementing the new tag might help your web pages load faster.
  • Replacing existing tags: Instead of implementing a new tag and keeping the existing tags on your site pages, another option is to add the new tag and remove existing tags. If you decide to replace the tags, you'll need to make sure that you don't disrupt your live campaigns. Just follow these steps:
    1. Add the new tag to all pages of your site and remove the old tags in one step.
    2. Define new remarketing lists based on your site URLs. The older remarketing lists will retain the set of cookies that they already had, with cookies being removed from the list based on the list membership duration.
    3. Add these new lists to your existing campaigns. This will set up those campaigns to target the original list OR the new list, which means you’ll reach the site visitors who were on the original list, as well as the new site visitors added to your new list.
    4. After 30 days (assuming that's your list membership duration), the new lists will be fully populated and the original lists will be empty.
    5. Remove the original lists from the campaigns.
    6. Close the original lists.

    Although we recommend removing existing tags and adding the new tag at once, it may be technically challenging to do so. It should be easily done if you're using a content management system (which allows to quickly remove and add tags to the website). Replacing tags on the source code, however, can be time consuming.

    Below are instructions on how to manually make changes to your tag:

    1. Add the new tag to all pages of your site.
    2. Create new remarketing lists based on URLs.
    3. Wait for those lists to be populated with site visitors (for example, if you typically set your lists with a 30-day duration, wait for 30 days).
    4. Change your existing campaigns to target these new lists.
    5. Remove the old tags.
    6. Close the old lists.
Upgrade to dynamic remarketing for your site

If you already have a regular remarketing tag and a Google Merchant Center account, you can make a few changes to your existing tag to start using dynamic remarketing.

You'll need to add another piece of code to your tag: the google_tag_params section.

When you add the google_tag_params section with the recommended parameters to your site-wide tag, the four remarketing lists automatically created to be used with your dynamic remarketing campaign will start populating. If you already have the google_tag_params section in your tag, make sure that the recommended parameters are implemented. If google_tag_params is not present, add this section with parameters before the tag code. See instructions on how to add the dynamic remarketing tag to your site.

Older AdWords remarketing tag implementations may have the google_custom_params section in the middle of the tag code, instead of before the tag itself. You can leave the parameters in this section, as long as they have the standard names required to use dynamic remarketing.

Add your remarketing code to your site

If you have a typical website, paste the remarketing code snippet at the bottom of each web page, just before the closing "</body>" tag in your source code.

If your site doesn't have a footer or you don't have a content management system, you can still paste the code quickly on multiple pages using the "find and replace" feature. You'll need to find "</body>" and replace it with the tag code followed by the "</body>" tag.

Below is an example of how your web pages would look after you add the code. Make sure that you don't add this sample code to your website.

<!-- Google Code for Remarketing Tag -->
Remarketing tags may not be associated with personally identifiable information or placed on pages related to sensitive categories. See more information and instructions on how to set up the tag on:
<script type="text/javascript">
var google_tag_params = {
ecomm_prodid: 'REPLACE_WITH_VALUE',
ecomm_pagetype: 'REPLACE_WITH_VALUE',
ecomm_totalvalue: 'REPLACE_WITH_VALUE'
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 0000000000;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
<script type="text/javascript" src="//">
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//;guid=ON&amp;script=0"/>

</body> Arrow iconThe remarketing code has been pasted above the </body> tag.


Then save your pages and publish them to the web.


When implementing the AdWords remarketing tag, especially with custom parameters, you can use Google Tag Assistant to check that you're implementing the tag correctly. (Note: This help article is available in English only.) Google Tag Assistant is a Chrome extension that automatically verifies Google code snippets on any page and can help you solve errors it detects. Download and install Tag Assistant via the Google Chrome Store.

Most websites use one file for common content, so it's likely that you won't need to place the code snippet on every single page of your website. If you're not sure how to add the code to your site, email this help article to your webmaster, IT department, or technical resource.

Add the remarketing tag to your mobile app

1. Get your remarketing tag code

  1. Go to your "Shared library".
  2. Click View in the "Audiences" section.
  3. Click the + Audience button.
  4. Choose to create a new remarketing list.
  5. Next to "Who to add to your list", select Visitors of a page with a specific tag.
  6. Click the + New tag button.
  7. Click Save, which takes you back to "Audiences".
  8. In the "Tags/Definitions" column, click the Tags link.
  9. On the next screen, you'll have the option to change your platform and select an operating system. For "Platform" select Mobile App, and then choose an operating system.
  10. Look in the box underneath to get the remarketing code you’ll need to add to your mobile app.

2. Add your remarketing tag to your mobile app

Once the tag is added to your app, the next step is to create remarketing lists in AdWords.


Add the remarketing tag to every screen in your mobile app. You can then easily create lists for any interaction with your app without ever having to add more remarketing tags.

Add your remarketing code to your mobile app

Adding your remarketing code snippet to your mobile app is very simple. Once you've chosen the right platform in AdWords (Android or iOS), you'll get a code snippet. You'll just need to enter the name of the screen on which the remarketing code is implemented, plus any other custom parameters you want to include to better differentiate your customers for remarketing.

Use your Google Analytics tracking code

You can use your Google Analytics tracking code instead of the AdWords remarketing tag to create your remarketing lists. Doing so provides the following benefits:

  • Maintain a single tag on your site.
  • Create lists based on over 250 Google Analytics metrics like time on site and total transactions.
  • Import your Google Analytics custom segment definitions.

In order to use the Google Analytics tracking code as your remarketing tag, you’ll need to have the following set up:

  • Google Analytics tracking code on your website.
  • Linked AdWords and Google Analytics accounts.
  • Same email address registered with both accounts (set to administrative access in Google Analytics).
  • “Use Google Analytics tracking code instead of the AdWords remarketing tag” option selected in AdWords (see “Get your remarketing tag code” section above for instructions).

Note: Deleting your Google Analytics account or unlinking it from your AdWords account may make your remarketing lists less effective over time since new people won’t be added to those lists as they visit your site.

Read more detailed instructions.

More sophisticated lists

The remarketing tag also lets you send custom parameters to your AdWords account that you can use to create more sophisticated remarketing lists. In addition, our automated bidding system can use these custom parameters to optimise bids. For example, your tag could pass in the value of the product viewed (the custom parameter in this example would be "ecomm_pvalue"), and you could create lists of people who viewed products with a price of less than £100, £100-£500 and £500+. Learn more about custom parameters.

Your tag can also send in customer lifetime value ranging from 1 to 3 with 1 being the most valuable. Then, our automated bidding can learn from that information (or you can segment your lists) and optimise bids accordingly based on predicted click and conversion rates for each of these values.

Next steps

Was this article helpful?