This article is for developers who want to move Floodlight tags from a Tag Manager web container into a server container.
Server-side Tag Manager allows you to move your Google Floodlight sales and counter tags from the web page to the server. Moving these tags to the server will reduce the amount of code you have to run in the page, and helps improve page load times.
Before you begin
Before you can move tags into your server, make sure that you have:
- Set up a server container
- Set up the Google Analytics: GA4 client
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.
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 Floodlight Counter tag in the server container
From your server container workspace, select Tags on the left side of the page
- Click New
- Select the Floodlight Counter tag type
- To gather the values required for tag configuration, open another browser
window and sign in to
Campaign Manager 360.
Click Advertisers, and then click the name of the advertiser. Enter
these values in your new Tag Manager Floodlight Counter tag:
- Advertiser ID: The Advertiser ID will appear on the advertiser details
page just below the advertiser's name. This value is also found as the
value of
src=
in a generated Floodlight tag snippet. - Group Tag String: In the Activity table, identify the activity you
want to work with and find the group tag string listed in a column to
the right. This is also found as the value of
type=
in a generated Floodlight tag snippet. - Activity Tag String: In the Activity table, identify the activity you
want to work with and find the activity tag string listed in a column
to the right. This is also found as the value of
cat=
in a generated Floodlight tag snippet.
- Advertiser ID: The Advertiser ID will appear on the advertiser details
page just below the advertiser's name. This value is also found as the
value of
- Set the desired Counting Method:
- Standard: Counts every conversion.
- Unique: Counts the first conversion for each unique user during each 24-hour day, from midnight to midnight, Eastern Time (US).
- Per session: Counts one conversion per user per session. Session length is set by the site where the Floodlight tag is deployed.
- Open the Choose a trigger window.
- Select a desired trigger, such as All Pages.
- Enter a tag name and click Save.
Set up the Floodlight Sales tag in the server container
Setup steps for the Sales tag are the same as the steps for the Floodlight Counter tag apart from the step 2:
- Select the Floodlight Sales tag type
Order ID (Transaction ID), Revenue (Value) are automatically read from the corresponding ecommerce field.
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 Floodlight tag
In your server container enable Enhanced Conversions in the Floodlight Sales or Floodlight Counter tag.
- Check Include user-provided data checkbox.
- Press Save to save your changes.
Optional: Revenue Value
The Floodlight Sales tag uses the event's value
parameter as the default
amount to calculate revenue. To specify a different basis to calculate the
revenue value, you need to set up a variable to pull data from your database in
and assign it to your Floodlight Sales tag.
To create a new variable:
- In your server container, open the Variables menu.
- Create a new user-defined variable for the data input. For example, if you want to use a value from a Firestore database, create a {{Firestore Lookup}} variable.
- Specify the data sources for the variable.
- Name the variable, for example, "Profit lookup" and Save it.
To use the variable in the Floodlight Sales tag:
- In your server container, open the Tags menu.
- Edit the Floodlight Sales tag.
In the Unique Parameters section:
- For Data Source, pick Custom configuration.
- For Revenue, select the variable you've created before.
- For Order ID, enter an ID or use a variable to dynamically populate the order ID.
Save the tag.
Optional: Custom parameters
You can pass
custom fields
from your web page to the Google Marketing Platform, such as match_id
.
Google Tag Manager
To configure custom fields for Floodlight, prepend x-dc-
to a
parameter name:
- In your web container, open the Tags menu.
- Edit a GA4 Event tag or create a new one.
In Event Parameters, add the parameter name. To signal that it goes to Floodlight, prepend
x-dc-
. For example, if you would normally sendmatch_id
, change it tox-dc-match_id
.Save the tag.
gtag.js
To configure custom fields for Floodlight, prepend x-dc-
to the event
parameter name:
gtag('event', 'purchase', {
'x-dc-match_id': [MATCH_ID],
...
})