Thanks for previewing Google's new tag documentation! This site is in public beta. (Feedback)

Dynamic Remarketing

Remarketing allows you to show ads to people who have previously visited your website or used your mobile app. Dynamic remarketing takes this a step further, letting you show previous visitors ads that contain products and services they viewed on your site. With messages tailored to your audience, dynamic remarketing helps you build leads and sales by bringing previous visitors back to your site to complete what they started.

Before you begin

To set up dynamic remarketing you will need to do the following:

  • Tag with custom parameters Add the dynamic remarketing tag with custom parameters to all pages of your website. The tag adds your website visitors to remarketing lists and associates them with the unique IDs of the feed items they viewed. In Google Ads, you can find your tag in the Audience manager section of your Shared library.
  • Product or service feed Create a feed that includes all of your products or services, along with details about each item (unique ID, price, image, and more). These details are then pulled from your feed into your dynamic ads. You’ll upload your feed to the Business data section of your Shared library, unless you’re a retailer. Retailers will instead upload product feeds to the Google Merchant Center.
  • Create responsive Display Ads Responsive display ads are asset-based, and automatically adjust their size, appearance, and format to fit available ad spaces. Dynamic remarketing campaigns show customers personalized content from a product feed you control and attach to your campaign. Learn more about responsive display ads.

In this article we will focus on tagging with custom parameters for dynamic remarketing. For more information on product feed and responsive ads refer to these articles:

Implementation options

You can use either Google Ads or Google Analytics (Universal Analytics) for dynamic remarketing. Both methods are supported in global site tag implementations as well as Google Tag Manager implementations.

Google Ads remarketing Google Analytics remarketing
  • If you’re looking to enable remarketing only, the Google Ads tag is recommended.
  • If you’re already running Remarketing lists for search ads (RLSA), you can continue to use the same tag by modifying/updating the Google Ads Remarketing tag by passing the custom parameters.
  • Create remarketing lists based on web page URLs or custom parameters.
  • If you want to use detailed analytics data for remarketing, the Google Analytics method is recommended. Google Analytics also provides full-featured website analytics capabilities to analyze and optimize performance.
  • If you’re already running Google Analytics, you can enable remarketing easily from the user interface without any tag updates. Under your advanced settings, set Enable Advertiser Features to ON.
  • Create remarketing lists based on web page URLs, custom parameters, or your customers’ website behavior, such as time on site or number of pages visited.
  • Dynamic remarketing requires a Universal Analytics implementation, and is not yet supported by Google Analytics 4.

Dynamic Remarketing with Google Ads

To create a remarketing tag, or retrieve the conversion ID used for remarketing, follow the steps below:

  1. Sign in to your Google Ads account.
  2. Click the tools icon in the top right corner of your screen.
  3. Under "Shared library" click Audience manager.
  4. From the page menu on the left click Audience sources.
  5. In the Google Ads tag card, click Set up tag. If you already set up a Google Ads tag, you can edit the tag by clicking the more actions menu and then Edit.
  6. 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.
  7. Select the business types that represent your products and services. Business types are used to tell your tags to collect information about activity on your website that is specific to your business. If your business type isn’t listed, select "Other (custom option)".
  8. Select the business type parameters you’d like to track.
  9. Click Create and continue.
  10. When the installation screen appears, your global site tag and event snippet will be ready for use. You can copy the code, use Tag Manager, download the tag, or email the tag to a web developer.

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

gtag.js

  • Create a Google Ads tag from within Google Ads. If you already have a global site tag implemented, update your existing tag instead.
  • Setup to "Collect specific attributes or parameters to personalize ads" and choose to include event parameters for your business.

Tag example:

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

    gtag('config','AW-XXXXXX');
  </script>

Event parameter tag example for a retail vertical:

<script>
gtag('event','view_item', {
  'value': 998.55,
  'items': [
    {
      'id': 1234,
      'google_business_vertical': 'retail'
    },
    {
      'id': 45678,
      'google_business_vertical': 'retail'
    }
  ]
});
</script>

Tag Manager

  • Get the Conversion ID for your Google Ads tag.
  • Setup to "Collect specific attributes or parameters to personalize ads" and choose to include event parameters for your business.
  • Create a new tag in Google Tag Manager. Make sure you select the "Google Ads Remarketing" tag type. Learn more about installing Tag Manager.
  • Deploy a Google Ads remarketing tag on every page of your site.
  • Pass dynamic values for each remarketing event to the remarketing tag on key steps of your site. These values can be things like the product ID of an item a user added to their cart, the origin and destination of a flight a user searched for, the promotion ID of an offer a user had clicked on, etc.)

For detailed instructions to implement dynamic values for the event parameters, read Google Ads Dynamic Remarketing.

Dynamic remarketing with Google Analytics

Standard remarketing with Analytics relies on an audience definition based on the dimensions and metrics that are available in Analytics when you enable advertising features. These dimensions and metrics describe and measure user- and session-based behavior on your site, and also include user attributes like Age, Gender, and Interest.

With dynamic remarketing, you will update your page tags with vertical-specific attributes so that you can collect additional information that allows you to further refine your audiences. For example, Analytics can collect things like the IDs of products that users interact with on retail websites and the origin and destination information that users supply on travel websites. After your tags are updated with vertical-specific attributes, you will then create corresponding dynamic attributes in Google Analytics and link them to your Google Ads account.

With updated tags and corresponding attributes in Google Ads, you can then create the audiences that will receive personalized remarketing ads. The content of the ads is based on the data Analytics captures; for example, if users have viewed a specific product on your site, then you can show those users a remarketing ad for that product or for a related or top-performing product.

To set up dynamic remarketing with Google Analytics:

gtag.js

  1. Enable Remarketing and Advertising Reporting Features in Analytics.
  2. Link your Google Ads and Analytics accounts.
  3. Link your Google Merchant Center and Google Ads accounts.
  4. Update your Google Analytics tag to pass parameters for your business vertical via custom dimensions.
  5. Create an audience for dynamic remarketing to share with your Google Ads account.
  6. Create attributes for dynamic remarketing in your Google Analytics property.
  7. Create your Dynamic Remarketing campaign in Google Ads.

Learn more about dynamic remarketing with Google Analytics

Tag Manager

Remarketing allows you to show ads to your users and customize those ads based on the content that your users experienced. With dynamic remarketing, you can take this a step further and show your site visitors an ad with the specific product they viewed on your site.

Step 1: Set up Custom Dimensions

When your users view content tagged with vertical attributes (for example, an ad for a specific shoe), then that information is passed to Analytics as custom dimensions. Analytics makes that information available to your Google Ads dynamic remarketing campaign.

To create custom dimensions, follow the instructions in the Google Analytics help center.

Make sure you set the Custom Dimension names exactly as recommended in the custom dimensions guide. Keep in mind there will be different keys for different verticals, so be sure to look up the appropriate vertical values.

For example, the retail vertical will require an ecomm_prodid dimension, and you will need to include dimensions for ecomm_pagetype and ecomm_totalvalue since dynamic remarketing in Analytics requires them.

For each Custom Dimension, set the Scope menu to Hit. This will make it so that these actions will apply to pageviews, but won't stick to a session or user.

Record the index number for each dimension you create. You will need these index numbers for your Tag Manager configuration.

Step 2: Set up the data layer

Work with your web developer to add the necessary attributes to your data layer. These data layer keys and values will be used by your tag to identify the product of interest. This example represents a retail transaction where the product ID, the page type, and the total value of a product are pushed to the data layer:

dataLayer.push({
    'product_ids' : 'AA12345',
    'page_type' : 'product',
    'total_value' : 49
});

Step 3: Set up Dynamic Attributes

The goal of Dynamic Attributes is to link vertical attribute information from Google Analytics to your Google Ads account. To set up Dynamic Attributes in Google Analytics:

  1. In Google Analytics, navigate to Admin > Property column: Tracking Info > Data Collection and set the Remarketing toggle to On. Click Save.
  2. Link your Google Ads account.
    1. Select the Google Ads account you would like to link
    2. Give the link group a name in the Link group title field.
    3. Use the toggle switches to link one or more views of your data.
    4. Click Link accounts and then click Done.
  3. While still in the Admin section, navigate to Property column: Audience Definitions > Dynamic Attributes.
  4. Click +New Attribute.
  5. In the Configuration section, set Business Type (such as Retail), View, and Destination account. Click Next step when done.
  6. In the Dynamic Attributes section, set your attributes from the custom dimensions created earlier. For example, if you are using Retail, you will set Product ID to ecomm_prodid , set Page Type to ecomm_pagetype, and Total Value to ecomm_totalvalue.
  7. Click Save.

Step 4: Create audiences in Analytics

Now that you’ve updated your tags with the attributes you want to use, those attributes are then made available in Analytics. You can now use these attributes to create your remarketing audiences. Follow Learn more about how to create audiences.

Step 5: Create user-defined variables

In Tag Manager, create three new user-defined variables to match the data layer values and custom dimensions you set up earlier:

  1. In your Tag Manager workspace, navigate to Variables and click the New button in the User Defined Variables section.
  2. Click Variable Configuration and select Data Layer Variable.
  3. Set the Data Layer Variable Name to the name of the variable in your dataLayer() object. Using the above dataLayer() code example, this value would be set to "product_ids".
  4. Leave the Data Layer Version set to the default value of 2.
  5. Name the variable. For this Retail product ID example you would use "Product IDs".
  6. Save the variable.

Repeat this process for your remaining user-defined variables.

Step 6: Add user-defined variables to Tag Manager

The final step is to add the new user-defined variables you created in Tag Manager to your Google Analytics settings variable:

  1. Navigate to Variables and select your Google Analytics settings variable.
  2. Click Variable Configuration and navigate to More Settings > Custom Dimensions.
  3. Click Add Custom Dimension.
  4. Use the (TODO INSERT IMAGE)Variable Selector to set the dimension value for each user-defined Tag Manager variable that you created earlier. The index values will correspond with what you recorded in step 1 when creating custom dimensions in Analytics. For instance, Index might have a value of 3, and Dimension Value might read {{Product IDs}}.
  5. Save the configuration and publish the container when ready.