This guide explains how to set up Bing Ads (Microsoft Advertising Universal Event Tracking) using a server-side Google Tag Manager container provisioned by Seers.
Prerequisites
Before starting the implementation, make sure the following are ready:
- Microsoft Advertising Account Access: You must have Administrative or Edit-level access to your organisation's Microsoft Advertising (Bing Ads) account.
- Bing UET Tag ID: You must have created a Universal Event Tracking (UET) Tag in your Microsoft Advertising account. The unique numerical UET Tag ID this generates will be needed during setup.
- Microsoft Click ID (msclkid): This is the unique identifier that Microsoft Ads appends to your landing page URLs when a user clicks an ad. It is mandatory for click-based attribution and must be captured and forwarded to your server container.
- Server-Side GTM Container (Seers): A server-side GTM container provisioned by Seers, accessible via a first-party endpoint, and configured to process GA4 events. Visit the Seers Get Started documentation for setup instructions, and refer to Google's support documentation for guidance on sharing GTM container access.
Why Use Server-Side Tagging with Bing Ads?
Greater Data Accuracy
Server-side tagging bypasses browser-based ad blockers and privacy restrictions such as Apple's ITP, ensuring that more of your conversion data is captured and delivered to Microsoft Advertising. This leads to more accurate campaign measurement and better optimisation decisions.
Improved Website Performance
By removing JavaScript tracking tags from the browser and consolidating data into a single server-side stream, you reduce page load times and improve Core Web Vitals. The result is a faster, smoother experience for your users.
Stronger Data Control and Security
Your server becomes a centralised governance layer for all outgoing data. Before anything is sent to Microsoft, you can enrich, filter, or transform it, removing sensitive PII where needed and ensuring full compliance with privacy regulations such as GDPR.
Future-Proof Architecture
This approach reduces reliance on third-party cookies by operating within a first-party data context. As browsers continue to restrict cross-site tracking, server-side tagging keeps your measurement infrastructure resilient and effective in an increasingly privacy-focused landscape.
Implementation Overview
The setup involves retrieving your UET Tag ID from Microsoft Advertising and configuring your web GTM container to capture the MSCLKID from landing page URLs and forward it to your server. In the server container, you will add the Microsoft Advertising tag template, create and configure a new tag with your UET ID and MSCLKID data, assign a trigger for the conversion event, validate the setup using Preview mode, and publish the container.
Step 1: Retrieve Your Microsoft UET Tag ID
The UET Tag ID is the unique identifier for your tracking tag within Microsoft Advertising. Follow these steps to locate it:
- Log in to your Microsoft Advertising account.
- In the top navigation bar, click Tools.
- From the dropdown menu, under the Conversion Tracking section, select UET tag.
- On the UET tags page, find the Tag ID column in the table. The number listed there is your UET Tag ID; it is typically a 7 to 9-digit number.
You will use this ID in the UET Tag ID field when configuring your server-side Microsoft Advertising tag in Step 4.
Step 2: Capture the Microsoft Click ID (MSCLKID)
The MSCLKID must be captured from your landing page URLs and passed through to your server-side GTM container. This involves two parts: enabling auto-tagging in Microsoft Advertising and creating a variable in your web GTM container to read the value.
Enable Auto-Tagging in Microsoft Advertising
- In your Microsoft Advertising account, click the gear icon to open the main settings.
- Navigate to Account level options.
- In the Auto-tagging section, ensure the checkbox for Add Microsoft Click ID (MSCLKID) to my landing page URLs is enabled. This will automatically append the click ID to all URLs receiving paid ad traffic.
Create the MSCLKID Variable in Web GTM
- Open your web GTM container and go to Variables.
- Under User-Defined Variables, click New.
- Name the variable something descriptive, such as URL - msclkid.
- For Variable Configuration, select URL.
- Set the Component Type to Query.
- Set the Query Key to msclkid.
- Click Save.
Pass the MSCLKID to Your Server Container
With the variable created, you now need to include it in the data being sent to your server-side GTM container by adding it to your GA4 Configuration tag.
- In your web GTM container, go to Tags and open your primary GA4 Configuration tag, the one responsible for sending data to your server container.
- Under Configuration Settings, expand the Fields to Set section.
- Click Add Row.
- Set the Field Name to msclkid.
- Set the Value to your new variable: {{URL - msclkid}}.
- Save the tag, test it in Preview mode, and publish your web container.
Step 3: Install the Bing Ads Tag Template
Before creating the tag, you need to add the Microsoft Advertising tag template to your server-side GTM container from the Community Template Gallery.
- Open your server-side GTM container.
- In the left-hand navigation, click Templates.
- Under the Tag Templates section, click Search Gallery.
- In the search bar, type Microsoft Advertising or Bing.
- Locate the Microsoft Advertising Universal Event Tracking tag template.
- Click on it, select Add to Workspace, and confirm the required permissions.
Step 4: Create the Bing Ads Conversion Tag
With the template installed, you can now create and configure the tag that will send conversion data to Microsoft Advertising's servers.
- In your server-side GTM container, go to Tags in the left-hand menu and click New.
- Give the tag a clear, descriptive name, for example, Server Side - Microsoft Ads UET - Purchase.
- Click Tag Configuration and select the Microsoft Advertising Universal Event Tracking template you just installed.
- Configure the following fields:
- UET Tag ID: Enter your Microsoft Advertising UET Tag ID from Step 1. It is best practice to store this value in a Constant Variable for easy management and reuse.
- MSCLKID: Add the Microsoft Click ID to the Microsoft Click ID (from the URL) field by creating an Event Data Variable that reads the msclkid parameter from the incoming event data.
- Event Type: Select the appropriate event type. For a standard page view, you can leave this as Page Load. For a conversion event such as a purchase, select Custom.
- Additional Parameters: Add any supplementary information you want to track, such as User ID, Page URL, or e-commerce data, based on the parameters relevant to your campaigns.
- Save the tag.
Step 5: Create the Conversion Trigger
The trigger defines when your tag fires. In this step, you will create a trigger that activates only when a specific conversion event, such as a purchase, is received by the server container.
- Within your new tag, click on the Triggering section.
- Click the + icon in the top-right corner to add a new trigger.
- Give the trigger a descriptive name, such as Event - Purchase.
- For Trigger Configuration, select Custom.
- Set the trigger to fire on Some Events.
- Configure the firing condition as: Event Name - equals - purchase.
| Note: The Event Name variable is a built-in variable that reads the en parameter from the incoming GA4 hit. Make sure the event name used here matches exactly what is being sent from your web GTM container. |
- Save the trigger, then save the tag.
Step 6: Validate and Debug
Before publishing, it is essential to verify that your setup is working correctly end-to-end.
- In your server-side GTM container, click Preview to enter Preview mode.
- In a new browser tab, open your website and trigger the conversion event you configured, for example, complete a test purchase.
- Return to the server-side GTM Preview tab. You should see the incoming request from your browser listed in the event summary.
- Click on the event (e.g., purchase) in the left-hand summary panel.
- In the Tags Fired section, confirm that your Server Side - Microsoft Ads UET - Purchase tag appears and shows as fired.
- Click on the tag itself and navigate to the Outgoing HTTP Requests tab. Inspect the request being sent to bat.bing.com and verify that all parameters, such as revenue, currency, and event type, are correctly populated.
A correctly populated outgoing request confirms that your server-side container is successfully transmitting conversion data to Microsoft Advertising.
Step 7: Publish
Once you have confirmed that the tag fires correctly and all outgoing data is accurate, you are ready to publish your server-side container.
- Click Submit in your server-side GTM workspace.
- Enter a version name and a brief description of the changes made, for example, "Added Microsoft Ads UET Tag for Purchase Events".
- Click Publish to make the changes live.