Server-side Tag Manager allows you to move your Google Ads conversion tracking tags from the webpage to the server. Moving these tags to the server will reduce the amount of code you have to run in the page, and may help improve page load times.
Setup steps
The following sections describe how to configure your Tag Manager web container and server container to use Ads conversion tracking. This article assumes that you already have a server container created.
Send data from the web container to the server container
All measurement for Ads products in a server container relies on the Google Analytics: GA4 Config tag in your web container to send data.
- Configure a Google Analytics: GA4 Configuration tag
- Set up a trigger for the configuration tag. The built-in All pages trigger is recommended for most cases.
If your conversion will be triggered on Page View
, then skip the rest of the
steps below.
Add a Google Analytics: GA4 Event tag to your web container.
In the dropdown, select the name of Google Analytics: GA4 Configuration tag that you just configured.
Enter the event name that corresponds to the conversion event.
Follow these instructions to mark an event as conversion.
Set up Google Analytics: GA4 client
Follow these instructions to set up your Google Analytics: GA4 client. If you already have a Google Analytics: GA4 client configured in your server container, you can skip this step.
Set up the Conversion Linker server-side tag
If you already have a Conversion Linker tag configured in your server container, you can skip this step.
From your server container workspace, select Tags on the left side of the page.
- Click New
Select the Conversion Linker tag type
Set up the trigger that will cause the Conversion Linker server-side tag to fire.
In most cases, you should use the built-in All pages trigger for this tag.Click Save
Set up the Ads Conversion Tracking tag in the server container
From your server container workspace, select Tags on the left side of the page
- Click New
- Select the Google Ads Conversion Tracking tag type
- Enter the conversion information (Conversion ID, label)
- Conversion ID and Label are required. Follow these steps to find the correct values in your Google Ads account.
Transaction Id, Conversion Value, and Currency Code are automatically read from the corresponding ecommerce field.
Set up the trigger for the Ads Conversion server side tag
- Open the Choose trigger type window.
- Select an existing trigger if available, or click the
icon to create a new one.
- Select a desired trigger type, such as Custom Event.
- Enter the event name that matches the one used in the Google Analytics: GA4 Event tag.
- Click Save.
*NOTE: You can filter on Page URL by selecting the Some Custom Events option. Once selected, add the Page URL variable to the left and then equals the URL string on the right.*
Handling custom conversion events
Ensure that the GA4 event is either a page_view
or is marked as a conversion
event in the Google Analytics UI.
Follow these steps to define new conversion event in Google Analytics:
- Open Google Analytics and click on
icon to open Admin page for the currently selected property.
- Select Setup assistant and click on Set up conversions.
- Select Conversions and click on New conversion event button.
- Enter the name of the conversion event and click Save.
Validate your implementation
Once you start sending data with the server container, you can check to see if it’s working properly by following these steps:
- Select Preview from the server container homepage.
- Click Tags. This will show the tags that have fired and can be used to validate whether the Ads Conversion Remarketing tag has fired.
- Click Errors. It is important to check the Errors section as well, since this will surface any errors that occurred during the transmission of data to the server container.
Enhanced Conversions
To configure Enhanced Conversions follow the steps below.
Configure Google Analytics: GA4 Config web tag.
In your Tag Manager web container, select the Google Analytics: GA4 Config tag you are using to send data to the tagging server.
- Check Include user-provided data from your website (Server only) checkbox.
Select an existing User-provided Data variable or create one.
Press Save to save your changes.
Configure Server-side Ads Conversion Tracking tag
In your server container enable Enhanced Conversions in the Google Ads Conversion Tracking tag.
- Check Include user-provided data checkbox.
- Press Save to save your changes.
Conversion Value
Optionally, you may specify a conversion value using a variable such as the
Firestore Lookup variable. If you do not configure a conversion value, the
value
on the event will be used.
If you configure a conversion value, specify these two fields:
- Conversion Value
- Currency Code
The value field is encrypted when it is specified in the server. This ensures that in cases where the tagging server sends the conversion data back to the browser the value will not be exposed.