How to send search data from Google Tag Manager to Google Ads

The visitors’ search behavior provides powerful insight into their interests and can be used to create ad campaigns that are relevant to those interests. This article will cover how to can use Cludo events through Google Tag Manager, Google Analytics, and Google Ads to show users relevant ads based on their specific search topics.

Before getting started

In order to correctly send search data from Google Tag Manager to Google, the following items are needed:

Any visitor property or behavior that can be tracked with Google Analytics can be used to group visitors into segments that will be shown in selected ads.

Example

A Bank wants to group visitors who make a search with the word savings in it, but did not click any search results, and do not have any existing bank account.

Set up a GTM tag for Google Analytics

The first step is to set up a GTM tag to send a custom event to Google Analytics when a user bounces from the result page.

  1. Log into Google Tag Manager
  2. Add a new tag
  3. Under Configuration, find and select the tag type Google Analytics: GA4 Event
  4. Under the Configuration tag, link this tag with the GA4 account either by:
    • Selecting an existing GA configuration which has previously been set in GTM
    • Manually entering your GA property’s measurement ID
  5. Give the event a descriptive Name for example search_page_bounce
  6. Add the parameters to associate with this event

Example

A Bank wants to track what the visitors searched for and whether or not they are logged into an existing banking account.

Note: The bank would need to add this login data to the GTM data layer on their own, but once it’s in the data layer, it can be used in combination with search properties provided by Cludo.

In this example, the search term is defined as an event parameter and the logged-in status as a user property.

A Google Analytics 4 tag with an event parameter and user property added.

Set up a trigger that fires when visitors are on the result page and click away to a different page that is not part of the search results.

  1. Set the Trigger criteria to match when any link is clicked on the search page, but our GTM variable CludoEventClickedUrl is undefined. This means no search results have been clicked
  2. Give your tag a unique Name
  3. Click the Save button
A trigger for leaving the search result page without visiting a search result.

Add an audience in Google Analytics

The next step is to add an audience in Google Analytics to group visitors that match the full criteria for the ads.

Example

The bank will use a search term and a logged in parameter on the visitors triggering the search_page_bounce event to create the needed Google Analytics audience.

At this current stage, search events are not sent in Google Analytics every time a visitor makes a search, but clicks away from the result page before clicking any results. With a Google Analytics audience, all the visitors that trigger this event can be grouped together and further filtered down to meet more specific criteria.

  1. Log into Google Analytics
  2. Open the Administration section
  3. Select Audiences under the property settings
  4. Click the New audience button
  5. Click the Create a custom audience button
  6. Add a new condition that matches when the desired event is detected. For example search_page_bounce
  7. Add parameters to further limit the audience conditions. In this example:
    • The search term parameter contains savings
    • The logged-in parameter equals false
  8. Give the audience a unique Name
  9. Click the Save button
A Google Analytics audience configured with parameters.

Verify the audience in Google Ads

The following steps require that you link your GA and Google Ads accounts.

The next step is verifying the Google Analytics audience appears as a segment in Google Ads.

  1. Log into Google Ads
  2. Open Tools and settings in the top navigation
  3. Select the Audience manager section
  4. Verify the Google Analytics audiences appear as a segments which can be used to target ad campaigns
  5. Create a new ad campaign according to Google’s documentation
  6. Apply the segment to the ad campaign to limit who can see the ad
A list of segments in Google Ads, including segments from Google Analytics.