Tag your website for dynamic remarketing

For subtitles in your language, turn on YouTube captions. Select the settings icon Image of YouTube settings icon at the bottom of the video player, then select "Subtitles/CC" and choose your language.

To show dynamic ads to people who have visited your site, add the Google tag and dynamic remarketing event snippet. The Google tag can be pasted as-is into all the pages across your site, and enables basic remarketing features in Google Ads. The event snippet collects data about specific actions related to products or services that are then matched with your data feed, and used to create personalized ads for dynamic remarketing. The data collected using the event snippet will vary according to your business type.

This article contains detailed instructions on how to set up your tag for dynamic remarketing. To learn more about dynamic remarketing set up, read the dynamic remarketing for web set-up guide. There is also a dynamic remarketing for apps setup guide.

Before you begin

If you've set up the Google tag to track your website visitors, you'll see that it consists of the Google tag and an event snippet. Learn how to set up conversion tracking for your website

Correctly setting up a tag is key to ensuring the best possible performance for your dynamic remarketing campaigns but it can be a tricky process involving customizing your website's code to pass dynamic data back to Google Ads. To successfully tag your website, you should be comfortable making changes to your page's code, or be able to enlist the help of a technical resource who can help. You can also review common issues with code formatting.

Note: Google Ads does not permit the implementation of tags on pages related to policy-restricted offers. Learn more about the Personalized advertising policy


Note: The instructions below are part of the new design for the Google Ads user experience. To use the previous design, click the "Appearance" icon, and select Use previous design. If you're using the previous version of Google Ads, review the Quick reference map or use the Search bar in the top navigation panel of Google Ads to find the page you’re searching for.

The Google Ads tag consists of your Google tag and the event snippet, which work in unison to measure your remarketing events. The event snippet collects data such as the IDs of the products or services that people viewed on your website and the total value of items. The event snippet tells the Google tag when to send more detailed remarketing event data. You’ll see the code snippets for the Google tag and the event snippet when you set up the Google Ads tag data source. Google Ads uses this data to show customized ads to your website visitors, and remind them about their visit to your site. Here's how to set this up:

  1. In your Google Ads account, click the Tools icon Tools Icon.
  2. Click the Shared library drop down in the section menu.
  3. Click Audience manager.
  4. Under “Shared library” click Audience manager.
  5. From the page menu on the left click Your data sources.
  6. In the Google Ads tag card, click Set up tag.
    • If you've already set up your Google tag, you can edit the tag by clicking the 3-dot icon and then Edit Source.
  7. Select “Collect specific attributes or parameters to personalize ads”.
    • This option is also known as “Dynamic remarketing” and allows you to show ads to people on your remarketing lists based on their activity on your site or app.
  8. Select the business types that represent your products and services and that define the parameters for dynamic remarketing tagging.
    • Business type is used to tell your tags to collect information about activity on your website that's specific to your business type. If your business type isn’t listed, select “Other (custom option)".
  9. Click Create and continue.
    • Or Save and continue if you’re editing instead of creating.
  10. You’ll see the “Tag setup” options. Click Install the tag yourself to find the tag code that you’ll add to your website pages. You can also “Email the code” to your web developer or use Google Tag Manager (you’ll find detailed instructions on using Tag Manager when you click on that option).
    • To integrate remarketing into your site yourself, copy the code and paste it between the <head></head> tags of the website.
    • The Google tag must be added into every page of your site. The event snippet only needs to be added to certain pages to measure remarketing events, such as product pages, shopping cart pages, or purchase confirmation pages. Learn more about event parameters for each business type
  11. Click Done.

Track events for your business type

For detailed instructions about how to populate the event snippet for your business type, read how to Use event parameters for your business type.

Updating your tag

If you have already added your Google tag to your site and want to start using dynamic remarketing, you only need to add a remarketing event snippet. The event snippet should be installed on pages that will track remarketing events. These might include product pages or shopping carts. It can be placed anywhere in the code, after the Google tag. Here’s an example of a retailer's tag where the Google tag is blue and the event snippet and event parameters are green.
Note: Event parameter or unique value names should be in English. For example, use cart in English and not carrinho for Brazilian Portuguese.

Dynamic and event parameters in the event snippet should use JavaScript Literal Object Notation, a format for transmitting structured data over a network connection. The Google tag (gtag.js) is a web tagging library for Google's site measurement, conversion tracking, and remarketing products.

The example below, shows the parameters for the "Retail" business type. You'll need to use the correct event parameter names (such as 'id') for your business type. See all of the event parameters by vertical

<!-- Google tag(gtag.js) - Google Ads: 123456789 -->
<script async src="https://www.googletagmanager.com/gtag/js?id=TAG_ID"></script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)
gtag('js', new Date());

gtag('config', 'TAG_ID');
<!-- Event snippet for Example dynamic remarketing page -->
gtag('event', 'add_to_cart', {
value: 345.89,
items: [{
origin: 'NYC'
destination: 'PAR',
google_business_vertical: 'flights'
origin: 'PAR'
destination: 'LON',
google_business_vertical: 'flights'
id: '123456',
location_id: 'LON',
google_business_vertical: 'hotels'


Advanced options

Disable the collection of your data

You can choose to disable the collection of personalized advertising data for users who do not wish to view personalized ads or for your own compliance reasons. You can modify the Google tag and disable the collection of personalized advertising data for particular users on your site, or choose to exclude all users from California in the Audience Manager section of your Google Ads account.

Was this helpful?

How can we improve it?
Clear search
Close search
Google apps
Main menu