Page Summary
-
Begin by tagging your site for remarketing by installing the Google tag and remarketing event snippet.
-
To enable dynamic remarketing, select the option to collect specific attributes or parameters to personalize ads when creating the Google Ads tag data source.
-
Install the Google tag on all pages that send remarketing information, and the event snippet right after the Google tag on pages you want to track.
-
Use custom parameters in your event snippet to send information about specific items or selections to Google Ads, syncing with your business data feed to show relevant products or services in ads.
Complete these prerequisites before implementing dynamic remarketing.
Install Google tag and remarketing event snippet
Begin by tagging your site for remarketing. You can retrieve the
global_site_tag or event_snippet from the API by querying the
tag_snippets field of the
conversion_action resource (which returns
TagSnippet objects).
Follow these steps to embed tags in your website manually:
Get the Google tag and the remarketing event snippet.
The Google tag sets a cookie on your site that collects information about the ad click that brought a visitor to your site and adds website visitors to standard remarketing lists in your Google Ads account.
To make sure the tagging works with dynamic remarketing, select Collect specific attributes or parameters to personalize ads during the step Create the Google Ads tag data source:

For detailed instructions on acquiring the Google tag and remarketing event snippet, see Tag your website using Google Ads.
Install the Google tag.
Install the Google tag on all pages of your website that send remarketing information. You need only one Google tag for each Google Ads account. The event snippet tracks additional actions that are counted as remarketing events. Install this snippet on site pages you'd like to track, right after the Google tag in the
<head></head>section.The Google tag also works with other tags such as Google Analytics tags. For details on how tags work, see the Google Analytics
gtag.jsdeveloper guide.Install an event snippet on site pages you want to track, with corresponding custom parameter values.
Custom parameters are elements in your remarketing tag code that let your tag send information about specific items or selections on your website to your Google Ads account. Custom parameters correspond directly to business data feeds, where you add the values that match the information the tag collects.
To use dynamic remarketing, you must include the custom parameters marked as
Requiredin Dynamic remarketing events and parameters.When you add the value of a custom parameter to your remarketing tag, it syncs with your feed to show the same product or service in your ads previously viewed by the same visitor.
The following example installs an event snippet for a retail site using Google Analytics 4 event parameters (where
item_idis the Merchant Center Product ID that corresponds to the product on the page):gtag('event', 'view_item', { currency: 'USD', value: 29.99, items: [ { item_id: '34592212' } ] });For detailed definitions of the parameters and their valid values, see Dynamic remarketing events and parameters.
The event name you use (such as
view_itemin the preceding example) can be a custom event name of your choosing or one of the recommended standard events. It doesn't need to match any specific value for implementing dynamic remarketing, as long as the event data parameters (items,currency, andvaluein this example) are correctly set.For detailed documentation on custom parameters for different business types and how the Google tag works, refer to Set up conversion tracking for your website.
Connect tag data to your campaigns
The custom parameters you send in the event snippet, especially identifiers
like item_id, must match the IDs in the data source you're using for your
dynamic remarketing campaigns in Google Ads.
There are two main types of data sources:
- Retail: Uses a product feed from Google Merchant
Center. The
item_idin the tag must match the Product ID in your Merchant Center feed. The Merchant Center feed is managed within Merchant Center and then linked to your Google Ads account. See the Merchant Center dynamic remarketing example. - Other business types: For business types such as flights, hotels, and
education, use asset-based feeds managed as
AssetandAssetSetresources using the Google Ads API. The IDs you pass in the tag—such asitem_id,origin, anddestination—must correspond to the specific identifier fields within yourAssetdata (such asDynamicEducationAsset.program_idorDynamicFlightsAsset.destination_id) within theAssetSet. See Dynamic remarketing with assets for details on how to use the API to manage these feeds and map the correct fields for your business type.