Google Ads Server-Side Tracking with Google Tag Manager

Updated: Saturday, April 27, 2024

Before you start

I’m going to show you how to set up Google Ads tracking on Google Tag Manager Server-Side. I’m assuming that you’ve already set up tracking on Google Tag Manager Client-Side and that you’re already sending data to the server container via Google Analytics 4.

Together, we’ll look at what the following tags are for, how to implement them and how they behave according to consent signals:

  • Conversion Linker
  • Google Ads Remarketing
  • Google Ads Conversion Tracking

Conversion Linker tag

What is the purpose of the Conversion Linker tag?

The Converion Linker is used to determine whether or not a visitor has come from advertising.

It will therefore detect the gclid parameter in the URL of the page visited and deposit a FPGCLAW cookie, which I believe stands for First Party Google CLick id Ad Words.

This cookie can then be read by the Google Ads conversion tags to transmit information to the advertising platform that the converting visitor comes from a Google ad. This makes it possible to attribute a conversion to an ad.

Example for a visitor who comes from an ad:

flowchart LR
    A["Visitor who comes\n from advertising"]-->B["The Conversion Linker detects\n gclid and deposits\n the FPGCLAW cookie"]
    B--The visitor\n converts-->C["Conversion tracking tag \nsends the FPGLCAW cookie value\n to Google Ads"]

Example for a visitor who doesn’t come from an ad:

flowchart LR
    A["Visitor who doesn't come\n from advertising"]-->B["The Conversion Linker doesn't detect\n gclid and doesn't deposit\n the FPGCLAW cookie"]
    B--The visitor\n converts-->C["Conversion tracking tag \n doesn't send the FPGLCAW \ncookie value to Google Ads"]

Conversion Linker tag configuration

The Conversion Linker tag must be triggered on all page_view events.

Conversion Linker tag configuration in GTM Server-Side
Conversion Linker tag configuration in GTM Server-Side

The behavior of the Conversion Linker tag according to the consent signals :

Granted consent signalsConversion Linker behaviour
None, all signals are deniedSends data to the sub-domain pagead2.googlesyndication.com without the gclaw parameter even if the FPGCLAW cookie is present.
ad_storageSends data to the sub-domain pagead2.googlesyndication.com without the gclaw parameter even if the FPGCLAW cookie is present.
ad_storage ad_user_dataSends data to the sub-domain pagead2.googlesyndication.com without the gclaw parameter even if the FPGCLAW cookie is present.
ad_storage ad_personalizationSends data to the sub-domain pagead2.googlesyndication.com without the gclaw parameter even if the FPGCLAW cookie is present.
ad_storage ad_user_data ad_personalizationSends data to the google.com domain name, including the gclaw parameter if the FPGCLAW cookie is present.

What is the Google Ads Remarketing tag used for?

The Google Ads Remarketing tag allows you to re-engage your visitors after an initial interaction with your website.

You can add these visitors to remarketing lists, showing them ads again in the hope that they’ll convert after several points of contact with your website.

Here are some examples of dynamic remarketing lists in Google Ads:

Remarketing audiences available in Google Ads
Remarketing audiences available in Google Ads

Classic remarketing

To set up classic remarketing, you just need to configure the remarketing tag on page_view events.

Google Ads Remarketing tag configuration on page_view event
Google Ads Remarketing tag configuration on page_view event

Dynamic remarketing

To configure dynamic remarketing, you need to check the Send dynamic remarketing event data box and trigger the tag on the following events:

Event NameDescription
page_viewSo that classic remarketing also works
view_search_resultsRetargeting based on site searches
view_item_listRetargeting based on product lists they’ve seen
view_itemRetargeting based on products they’ve seen
add_to_cartRetargeting based on products added to basket
purchaseRetargeting based on products purchased

Send user ID

To send the user ID via the Google Ads Remarketing tag, the user_id key must be present in the event data and you must have checked the Provide user ID box in the tag parameters.

Sending User ID with Google Ads Remarketing tag
Sending User ID with Google Ads Remarketing tag

The Google Ads Remarketing tag requires the three consent signals (ad_storage, ad_user_data and ad_personalization) to send a request from the browser to the domain name googleads.g.doubleclick.net.

This request contains :

  • the items array
  • the event name (data parameter)
  • the user_id (userId parameters)

Check data collection

Data received by the Google Ads Remarketing tag is visible in Shared library > Audience managemer > Your data sources > Details on the Google Ads tag.

Check data collected from the Google Ads Remarketing tag
Check data collected from the Google Ads Remarketing tag

What is the Google Ads Conversion Tracking tag used for?

The Google Ads Conversion Tracking tag is used to send conversion data to Google Ads. It can be triggered, for example, when a form is filled in on a lead generation website, or on a purchase event on an e-commerce site.

In this example, I’m going to trigger it on a purchase event.

Google Ads conversion tracking tag configuration
Google Ads conversion tracking tag configuration
Parameter to set upDescription
Conversion IDProvided in the Google Ads platform. One conversion ID per ad account.
Conversion LabelProvided in the Google Ads platform. One conversion tag per conversion action.
Conversion ValueThe tag will take the value of the value parameter in the default event data. It is not necessary to fill in this field except to override the value.
Currency codeThe tag will take the value of the currency parameter in the default event data. It is not necessary to fill in this field except to override the value.
Provide product-level sales dataIf you check this box, the tag will take the value of the items parameter in the default event data.
Provide new customer dataIf you check this box, the tag will take the values of the new_customer and customer_lifetime_value parameters in the default event data.
Include user-provided dataIf you check this box, the tag will take the value of the user_data parameter in the default event data.

Enhanced conversion tracking (user data)

Enhanced conversion tracking involves sending user data to Google Ads to help the platform link a visitor who has completed a conversion action to a Google account.

To enable enhanced conversion tracking, you need to check the Include user-provided data box and send user data to the server container via the following parameters:

Parameter keyExample
user_data.email_address[email protected]
user_data.sha256_email_address
user_data.phone_number+15551234567
user_data.sha256_phone_number
user_data.address.first_nameJohn
user_data.address.sha256_first_name
user_data.address.last_nameDoe
user_data.address.sha256_last_name
user_data.address.cityNew York
user_data.address.regionNY
user_data.address.postal_code10000
user_data.address.countryUS

user_data object example received by the server:

user_data: {
  email_address: "[email protected]",
  phone_number: "+15551234567",
  address: {
    first_name: "John",
    last_name: "Doe",
    city: "New York",
    region: "NY",
    postal_code: "10000",
    country: "US"
  }
}

The Google Ads Conversion Tracking tag will use this user_data parameter to transmit user data to Google Ads and thus enable enhanced conversions.

Acquisition of new users

New user acquisition allows you to bid differently depending on the type of user (new or recurring).

To activate this feature, check the Provide new customer data box and send the new_customer and customer_lifetime_value parameters to the server container.

Product data

To activate this feature, check the Provide product-level sales data box and send the items parameter to the container server.

Frequently asked questions

Yes, once you've set up your Google Ads server-side tracking, you can remove all Google Ads tags from your GTM client container.
Check that you are sending user data to Google Ads. If you've just published your Google Ads server-side configuration, wait several days for the Google Ads platform to update itself. If, after several days, Google Ads still tells you there's a problem, contact their support team. The most you can do is check that the data is being sent correctly.