Skip to main content

Send events using Google Tag Manager

Jonas Østergård Bæk avatar
Written by Jonas Østergård Bæk
Updated this week

Ensure that the Bidding signals tags are configured to fire only when the necessary consent is present. Additionally, make sure to share data in accordance with your privacy policies and applicable laws and regulations.

Follow only one of the two approaches explained below. Do not mix or implement both.

Approach #1: Google Tag Manager web container setup

1. Basic implementation

The basic implementation is always required.

  1. Create a new workspace in GTM.

  2. Click on 'Admin' in the main menu.

  3. Click on 'Import container'.

  4. Click 'Choose container file' and select the JSON file you downloaded in point 1.

  5. Under 'Choose workspace', click 'Existing' and select the workspace you created.

  6. Choose 'Merge' as the import option.

  7. Select 'Rename conflicting tags, triggers, and variables'.

  8. Click 'Confirm'.

Assets to modify

Below is the list of assets and possible modifications you can make to them:

Asset

Action

'GA4 - Bidding Signals - page_view' (config tag)

  • Make any necessary changes, such as adjusting the trigger setup, configuration settings, and event settings.

'GA4 - Bidding Signals - purchase'

  • Make the necessary changes to the trigger setup.

Lookup table variables (for example ‘Bidding Signals - LT - Config ID’)

  • Make the necessary adjustments.

  • If you only need one value for configuration, currency, market, and Measurement ID, feel free to add those values directly to the 'Bidding Signals Settings' variable.

'Bidding Signals - Settings Variable'

  • Ensure all 'Required' fields are set, as well as any 'Optional' fields that are applicable to your case (e.g., setting the fields for the Google Ads target).

  • Add variables to the 'ad_user_data' and 'ad_personalization' fields.

  • Hover over the question mark for each field to see the help text.

  • Uncheck 'dry run' before publishing your GTM workspace."

Assets to remove

Remove the following assets if your Bidding signals configuration does not utilise the Google Ads target:

  • Bidding Signals - Google Click ID to cookie (tag)

  • Bidding Signals - Google Click ID to cookie (tag template)

  • Bidding Signals - Cookie - gtm_es_gads_id

  • Bidding Signals - JS - Create Event Timestamp

2. If your target is Google Ads Click conversions

If your Bidding signals configuration is using the Google Ads Click conversions target, follow the instructions below:

Asset

Action

'Bidding Signals - Google Click ID to cookie'

  • Modify the trigger setup so that the tag fires on all pageviews when consent is present.

'Bidding Signals - Settings Variable'

  • Add the 'Bidding Signals - Cookie - gtm_es_gads_id' variable to the 'Google Ads Click ID' field.

  • Add the 'Bidding Signals - JS - Create Event Timestamp' variable to the 'Google Ads Event Timestamp' field.

3. If your target is Google Ads Restate Conversions

If your Bidding signals configuration is using the Google Ads Restate Conversions target, follow the instructions below.

1) Implement a new Google Ads Conversion tag:

  • In your GTM container, create a new workspace.

  • Go to Tags and add a new Google Ads Conversion tag.

  • Add the Conversion ID and Conversion Label related to the Google Ads conversion (goal) that you created when you set up the Google Ads Restate target in Alvie. Note that the Conversion ID to add is different from the ID added in Alvie, the correct ID is not found in the URL in Google Ads but instead by clicking on the conversion (goal), then under “Tag Setup” by clicking on “Google Tag Manager”.

  • Add a variable that returns the Conversion Value, for a Purchase event this would be a variable that returns the revenue.

  • Add a variable that returns the Transaction ID. If you don’t have a Transaction ID available you can use the “Unique Event ID” Variable Template from Stape as your Transaction ID value. Note that exactly the same trigger setup is needed for the Google Ads Conversion tag and the Bidding Signals tag, and no tag sequencing rules can be used for the “Unique Event ID” value to match between both tags.

  • Add any other relevant configurations to the tag, such as “product-level sales data” or “new customer data”.

  • Implement the separate “Google Ads User-Provided Data Event” tag if you intend to make use of Google Enhanced Conversions.

  • Add the relevant triggers.

Note. Make sure to add a Google Tag related to the Google Ads account where the conversion is created, if that does not already exist.

2) Perform below changes to the Bidding Signals assets:

Asset

Action

'Bidding Signals - Settings Variable'

Under the “Google Ads Restate” section add the same transaction/order ID as was added in the newly created Google Ads Conversion tag.

4. If your target is Meta Ads

If your Bidding signals configuration is using the Meta Ads target, follow the instructions below:

Asset

Action

'Bidding Signals - Settings Variable'

  • Add a variable in the Meta Click ID field.

  • Add a variable in the Meta Browser ID field.

  • Add a variable in the Content Type field.

Refer to the help text for each field in the 'Bidding Signals - Settings Variable' in GTM for more detailed instructions.

5. If your target is Google Tag Manager: Server-side

If your Bidding signals configuration is using the Google Tag Manager: Server-side target, read the instructions here.

6. If User-identify data is used

If you intend to send user-identifying data (also known as 'hashed identifiers') to various targets, follow the instructions below.

Asset

Action

'Bidding Signals - Settings Variable'

  • Enable the checkbox for user-provided data.

  • Add your chosen identifiers.

Approach #2: Google Tag Manager Server container setup

This setup requires Google Analytics 4 requests from a GTM Web container. If you already proxy Google Analytics 4 Web requests via Server GTM, you can use those events. If not, you need to implement Google Analytics 4 tags in your GTM Web container first.

1. Basic implementation

The basic implementation is always required.

  1. Create a new workspace in GTM.

  2. Click on 'Admin' in the main menu.

  3. Click on 'Import container'.

  4. Click 'Choose container file' and select the JSON file you downloaded in point 1.

  5. Under 'Choose workspace', click 'Existing' and select the workspace you created.

  6. Choose 'Merge' as the import option.

  7. Select 'Rename conflicting tags, triggers, and variables'.

  8. Click 'Confirm'.

Assets to modify

Below is the list of assets and possible modifications you can make to them:

Asset

Action

'Bidding Signals - GA4 - purchase'

  • Add variables to the 'ad_user_data' and 'ad_personalization' fields.

  • Adjust the trigger setup if necessary.

'Bidding Signals - GA4 - basic events'

  • Adjust the trigger to include more events than 'page_view' and 'user_engagement' if desired.

'Bidding Signals - LT - Config ID'

  • Make the necessary adjustments.

  • If you only need one value for config, currency, market, and Measurement ID, feel free to add those values directly to the 'Bidding Signals Settings' variable.

  • Ensure the Measurement IDs in the 'LT - ES - Is ES Measurement ID' variable reflect the Measurement IDs from the GA4 client-side setup used for Bidding Signals.

2. If your target is Google Ads Click conversions

If your Bidding signals configuration is using the Google Ads Click conversions target, follow the instructions below:

1. Create a new workspace in your GTM Web container.

2. Import only the following assets from this GTM container JSON into the workspace you just created:

  • Bidding Signals - Google Click ID to cookie (tag template)

  • Bidding Signals - Google Click ID to cookie (tag)

  • Bidding Signals - Cookie - gtm_es_gads_id (variable)

  • Bidding Signals - JS - Create Event Timestamp (variable)

3. In the web container, add the following key-value pairs to the Google Analytics 4 purchase tag responsible for sending requests to the GTM Server container and your Bidding Signals Server tag:

  • es_gads_id: {{Bidding Signals - Cookie - gtm_es_gads_id}}

  • es_gads_event_timestamp: {{Bidding Signals - JS - Create Event Timestamp}}

4. In the server container, exclude the above parameters from Google Analytics 4 tags.

5. In the server container, enable the Google Ads target in your Bidding signals tag.

3. If your target is Google Ads Restate Conversions

If your Bidding signals configuration is using the Google Ads Restate Conversions target, follow the instructions below.

1) Implement a new Google Ads Conversion tag:

  • In your GTM container, create a new workspace.

  • Go to Tags and add a new Google Ads Conversion tag.

  • Add the Conversion ID and Conversion Label related to the Google Ads conversion (goal) that you created when you set up the Google Ads Restate target in Alvie. Note that the Conversion ID to add is different from the ID added in Alvie, the correct ID is not found in the URL in Google Ads but instead by clicking on the conversion (goal), then under “Tag Setup” by clicking on “Google Tag Manager”.

  • Add a variable that returns the Conversion Value, for a Purchase event this would be a variable that returns the revenue.

  • Add a variable that returns the Transaction ID. If you don’t have a Transaction ID available you can use the “Unique ID Generator” Variable Template from “demirj” as your Transaction ID value. Note that exactly the same trigger setup is needed for the Google Ads Conversion tag for the “Unique ID Generator” value to match between both tags.

  • Add any other relevant configurations to the tag, such as “product-level sales data” or “new customer data”.

  • Implement the separate “Google Ads User-Provided Data Event” tag if you intend to make use of Google Enhanced Conversions.

  • Add the relevant triggers.

2) Perform below changes to the Bidding Signals assets:

Asset

Action

Bidding Signals - purchase

Under the “Google Ads Restate” section add the same transaction/order ID as was added in the newly created Google Ads Conversion tag.

4. If your target is Meta Ads target

If your Bidding signals configuration is using the Meta Ads target, follow the instructions below:

Asset

Action

'Bidding Signals - GA4 - purchase'

  • Add a variable to the Meta Click ID field.

  • Add a variable to the Meta Browser ID field.

  • Add a variable to the Content Type field.

Refer to the detailed instructions in the help text for each field in the 'Bidding Signals - GA4 - purchase' tag in GTM.

5. If your target is Google Tag Manager: Server-side

If your Bidding signals configuration is using the Google Tag Manager: Server-side target, read the instructions here.

6. If User-identifying data is used

If you intend to send user-identifying data (also known as 'hashed identifiers') to various targets, follow the instructions below.

Asset

Action

'Bidding Signals - GA4 - purchase'

  • Enable the checkbox for User-provided data.

  • Add your identifiers of choice.

Refer to the detailed instructions in the help text for each field in the 'Bidding Signals - GA4 - purchase' tag in GTM.

Did this answer your question?