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:
- An existing Google Analytics 4 account
- An existing Google Ads account
- A link between these two Google accounts
- The Cludo GTM integration enabled within MyCludo
- Custom GTM variables created for any parameters to be send to be used for targeted ads
- Usually includes the search term at minimum
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.
- Log into Google Tag Manager
- Add a new tag
- Under Configuration, find and select the tag type Google Analytics: GA4 Event
- 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
- Give the event a descriptive Name for example search_page_bounce
- 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.
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.
- 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
- Give your tag a unique Name
- Click the Save button
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.
- Log into Google Analytics
- Open the Administration section
- Select Audiences under the property settings
- Click the New audience button
- Click the Create a custom audience button
- Add a new condition that matches when the desired event is detected. For example search_page_bounce
- Add parameters to further limit the audience conditions. In this example:
- The search term parameter contains savings
- The logged-in parameter equals false
- Give the audience a unique Name
- Click the Save button
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.
- Log into Google Ads
- Open Tools and settings in the top navigation
- Select the Audience manager section
- Verify the Google Analytics audiences appear as a segments which can be used to target ad campaigns
- Create a new ad campaign according to Google’s documentation
- Apply the segment to the ad campaign to limit who can see the ad