Remarketing events and parameters for your business type

Dynamic remarketing allows you to automatically tailor your ads based on the products or services your users have interacted with during previous visits to your website. This article explains how to use the Google Ads tag to track relevant user events for your business type and the associated parameters you should set.

Before you begin

To enable this feature, you’ll need to integrate the Google Ads tag on your website, which sends data about the products or services viewed by your visitors. This data is then matched against your business data or Google Merchant center feed to retrieve information such as price, image, headline, and landing page URL, which is then dynamically inserted into your ads. 

Anatomy of a remarketing event

Remarketing events are meaningful actions taken by your website visitors when they visit your site. For example, these may include searching for airline tickets on a travel website, adding a product to an online shopping cart or completing a transaction. When such events occur, you should use the gtag.js event snippet to register the event and send information about the event to Google Ads.

Below is an example of how you should populate the event snippet if you were to track the view of two products on an eCommerce website.
 

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

 

The event snippet calls the gtag.js event function, and passes two arguments which must be dynamically populated based on the type of event you are measuring.

  • Event name: A string which describes the event being measured. It is used by the Google Ads system to assign users to one of several automatically generated user lists. We recommend that you use a specific set of event names from the list of recommended events described below.
Event name Description
view_search_results This event measures when a user visits a search results page.
view_item_list This event measures when a user visits a category page.
view_item This event measures when a user visits a product page.
add_to_cart This event measures when a user adds an item to the shopping cart.
purchase This event measures purchases.
  • Event parameters: A Javascript object containing data about the event you are tracking. The event parameter object should always have an items parameter that’s populated with one or more item objects. These item objects contain information about the product or service with which the user has interacted. Optionally, the event parameter object can also have a value parameter which represents the total value of the products or services.

You should always pass at least one item object when calling the event snippet to track remarketing events. You may pass more if the user interacts with multiple items, such as when checking out a shopping cart, or searching for a multi-city travel itinerary.

Note: Google Ads customizes your ad content using data about the items with which the user has most recently interacted. In cases where multiple products have been viewed by the user, such as on a category page or a page of product search results, we recommend passing data to the event snippet for the most relevant items you want to promote, rather than data for the entire product list viewed by the user.

 The content of the item object will vary depending on the type of product or service your site features. Refer to the section below to find the item specification for your business type. In any case, the item object should have a key that corresponds to the primary identifier of the product or service (id or destination) and the google_business_vertical key that represents the type of feed the identifier should be matched against.

Depending on your business type, Google Ads will use data from one or more item parameters to create feed keys, which are used to retrieve information about your products or services from your Google Merchant Center or business data feeds. The entries in your feed attributes and the corresponding parameters in the event snippet should always match.

For example, if you have a travel site, you may set the value of the origin ID for Paris to “PAR,” and the destination ID for London to “LON,” in your Flights business data feed. When a user searches for flights from Paris to London, you should also have the origin parameter set to PAR and destination parameter set to LON in the item object passed to the event snippet. Google Ads will then take the feed key “PAR+LON”, and match it with the Origin ID and Destination ID columns in the flights feed. Once the feed key is matched to your feed, Google Ads can show the user ads for flights from Paris to London. See the sample script below:

<script>
gtag('event','purchase', {
      'value': 639.74,
      'items':[{       
      'origin': 'LHR',
      'destination': 'LAX',
      'start_date': '2019-04-20',
      'end_date': '2019-04-21',
      'google_business_vertical': 'flights'
}]
});
</script>

 

In the following sections you will find information about the required and optional item parameters for each business type. For parameters that are used to create feed keys, the corresponding feed attributes to be matched will be indicated. Note: When entering event parameters, use only valid unicode characters. Avoid invalid characters like control, function, or private area characters.

Item parameters

Retail

These events apply to websites that sell products online. Note that data passed via retail events and parameters can only be used in conjunction with a business data feed for retail. If you want to promote an eCommerce website but are unable to set up a Google Merchant Center product feed, you may consider using the custom business type instead.

Retail item parameters

Parameter name Description Is this parameter required?
id

A unique product identifier. The parameter value must match one of the following attributes from your Google Merchant Center Product Feed: id, item_group_id, or display_ads_id.

Required
google_business_vertical Specifies the type of feed used to lookup the product. Value must be set to "retail". Recommended

Sample event snippet for retail

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

Education

These events apply to websites that feature education services such as college websites, online learning websites, adult continuing education websites. Data collected via education parameters is intended to be matched against a business data feed for education.

Education item parameters

Parameter name Description Is this parameter required?
id

A unique identifier for an education program. The parameter value must match the “Program ID”
attribute of your Education Business Data Feed. 

Required
location_id A location identifier for an education program. If set, the value must match the "Location ID" attribute of  your education business data feed.  Optional
google_business_vertical Specifies the type of feed used to lookup the product. Value must be set to "education". Recommended

Sample event snippet for education

<script>
gtag('event','view_item', {
  'value': 998.55,
  'items': [
    {
      'id': 'CS75', 
      'location_id': 'SFO', 
      'google_business_vertical': 'education'
    }]
});
</script>

Flights

These events apply to websites that feature  listings for flights. Data collected via flights parameters is intended to be matched against a business data feed for flights.

Flights item parameters

Parameter name Description Is this parameter required?
origin

The origin of the flight itinerary. This id must match a value in the Origin ID column of the Flights feed. Use only valid unicode characters. Avoid invalid characters like control, function, or private area characters.

Recommended
destination The destination of the flight itinerary being viewed. This id must match a value in the “Destination ID” column of the Flights Feed.
It is recommended that you use three-letter airport codes.
Required
start_date The date when the flight itinerary starts. 
Note:
The date should be in the YYYY-MM-DD format.
Optional
end_date The date when the flight itinerary ends. It is recommended to include this parameter because once the end date is passed, the product will no longer show.
Note: The date should be in the YYYY-MM-DD format.
Optional
google_business_vertical Specifies the type of feed of the item. Value must be set to "flights". Recommended

Sample event snippet for flights

<script>
gtag('event','purchase', {
      'value': 639.74,
      'items':[{       
      'origin': 'PAR',
      'destination': 'LON',
      'start_date': '2019-04-20',
      'end_date': '2019-04-21',
      'google_business_vertical': 'flights'
}]
});
</script>

Hotels and rentals

These events apply to travel websites where the user can book a hotel room, specifically websites that don’t use a hotel list feed. The data collected via hotel and rentals parameters is intended to be matched against a business data feed for hotels and rentals.

Hotels and rentals item parameters

Parameter name Description Is this parameter required?
id

The ID of the hotel or property. This ID must match a value in the "Property ID” column of your Hotel and rentals business data feed. 

Required
start_date The date when the booking starts. 
Note:
The date should be in the YYYY-MM-DD format.
Optional
end_date The date when the booking ends. It is recommended to include this parameter because once the end date is passed, the product will no longer show.
Note: The date should be in the YYYY-MM-DD format.
Optional
google_business_vertical Specifies the type of feed of the item. Value must be set to "hotel_rental". Recommended

Sample event snippet for hotel and rentals

<script>
gtag('event','purchase', {
  'value': 150,
  'items':[{
  'id': 'gb197',
  'start_date': '2019-04-18',
  'end_date': '2019-04-21',
  'google_business_vertical': 'hotel_rental'
   }] 
   });
</script>

Jobs

These events apply to websites where the user can view job listings. The data collected via jobs parameters is intended to be matched against a business data feed for jobs.

Jobs item parameters

Parameter name Description Is this parameter required?
id

The ID of the job listing. This ID must match a value in the "Job ID” in your Jobs data feed. 

Required
location_id A location identifier for a job listing. If set, the value must match the "Location ID" attribute of  your jobs business data feed.   Optional
google_business_vertical Specifies the type of feed of the item. Value must be set to "jobs". Recommended

Sample event snippet for jobs

<script>
gtag('event','purchase', {
  'value': 150',
  'items':[{
  'id': 'cc197',
  'location_id': 'NYC',
  'google_business_vertical': 'jobs'
   }] 
   });
</script>

Local deals

These events apply to websites where the user can find local deals. The data collected via local deals parameters is intended to be matched against a business data feed for local deals.

Local deals item parameters

Parameter name Description Is this parameter required?
id

The id of the offer or deal. This id must match a value in the “Deal ID” column of the Local Deals Feed. 

Required
google_business_vertical Specifies the type of feed of the item. Value must be set to "local". Recommended

Sample event snippet for local deals

<script>
gtag('event','view_item', {
  'value': 125,
  'items':[{
  'id': 'SPA6231',
  'google_business_vertical': 'local'
}]    
});
</script>

Real estate

These events apply to real estate websites. The data collected via real estate parameters is intended to be matched against a business data feed for real estate.

Real estate item parameters

Parameter name Description Is this parameter required?
id

The id of the property. This id must match a value in the “Listing ID” column of the Real Estate Feed. 

Required
google_business_vertical Specifies the type of feed of the item. Value must be set to "real_estate". Recommended

Sample event snippet for real estate

<script>
gtag('event','view_item', {
  'value': 1000000,
  'items':[{
  'id': 'NYBRKLN123A',
  'google_business_vertical': 'real_estate'
}]    
});
</script>

Travel

These events apply to travel websites. The data collected via travel parameters is intended to be matched against a business data feed for travel.

Travel item parameters

Parameter name Description Is this parameter required?
origin

The id of the travel origin. This id must match a value in the “Origin ID” column of the Travel feed. The combination of destination and origin  should be unique across all feeds in your account.

Optional
destination The id of the travel destination. This id must match a value in the Destination ID column of the Travel feed.  Required
start_date The date when the travel itinerary starts. Note that this should be in the YYYY-MM-DD format. Optional
end_date The date when the travel itinerary ends. Note that this should be in the YYYY-MM-DD format. It is recommended to include this parameter because once the end date is passed, the product will no longer show. Optional
google_business_vertical Specifies the type of feed of the item. Value must be set to "travel". Recommended

Sample event snippet for travel

<script>
gtag('event','view_item', {
  'value': 1000000,
  'items': [{
  'origin': 'LGA',
  'destination': 'LON123A',
  'start_date': '2019-04-20',
  'end_date': '2019-04-21',
  'google_business_vertical': 'travel'
    }]
});
</script>

Custom

These events apply to websites that do not fit into one of the other vertical-specific areas on this page, but still want to provide information for dynamic remarketing. The data collected via custom parameters is intended to be matched against a custom business data feed.

Custom item parameters

Parameter name Description Is this parameter required?
id

The id of the item. This id must match a value in the ID column of the Custom feed. 

Required
location_id A location identifier for the item. If set, the value must match the ID2 column of your feed and can be numeric or alphanumeric. Optional
google_business_vertical Specifies the type of feed of the item. Value must be set to "custom". Recommended

Sample event snippet for custom use case

<script>
gtag('event','add_to_cart', {
  'value': 78.98,
  'items':[{
  'id':'CORS9',
  'location_id': 'KURS8',
  'google_business_vertical': 'custom',
  }]
  });
</script>

 Related links

Was this helpful?
How can we improve it?