Skip to content

Bing Ads (Microsoft Advertising Universal Event Tracking)

This guide describes you how to set up Bing Ads using server-side Google Tag Manager.

Prerequisites

Before you begin the implementation, ensure you have the following in place:

  • Microsoft Advertising account access: You must have Administrative or Edit-level access to your organization's Microsoft Advertising (Bing Ads) account.

  • Bing UET Tag ID: You must have created the Universal Event Tracking (UET) Tag in your Microsoft Advertising account to obtain the unique numerical UET Tag ID for your property.

  • The Microsoft Click ID (msclkid): This is the unique identifier appended to your landing page URL by Microsoft Ads upon an ad click. It is mandatory for click-based attribution. 

  • Server-side GTM container: A server-side GTM container provisioned by  Usercentrics, available via a first-party endpoint, and configured to process GA4 events. Read our Getting started page to learn how to set up a server-side GTM provided by Usercentrics, and learn how to share access to a GTM container here.

Benefits of Server-Side Tagging with LinkedIn CAPI

  • Increased Data Accuracy: It bypasses browser-based ad blockers and tracking preventions (like Apple's ITP), ensuring more of your conversion data is successfully captured and sent to Microsoft Advertising. This leads to more accurate campaign measurement and better optimization.

  • Enhanced Website Performance: By reducing the number of JavaScript tags running directly on your website, you improve page load times and Core Web Vitals. A single data stream is sent to your server, which then distributes it, creating a faster and smoother user experience.

  • Superior Data Control & Security: You gain a centralized point of governance over the data before it's sent to Microsoft. This allows you to enrich, redact, or transform data, helping to remove sensitive PII and ensure compliance with privacy regulations like GDPR.

  • Future-Proof Architecture: It reduces reliance on third-party cookies by leveraging a more durable first-party data context. This positions your marketing measurement to be more resilient and effective in an increasingly privacy-focused, cookieless digital landscape.

Rollout plan

In the following you will learn how to track Microsoft Ads conversions using a server-side Google Tag Manager container. First, you must retrieve your UET Tag ID from Microsoft Ads and configure your web GTM container to capture the MSCLKID from the URL and send it to your server. Next, within the server container, you'll add the Microsoft Advertising tag template and create a new tag, populating it with your UET ID and the MSCLKID data. Finally, you will assign a trigger for the specific conversion event, validate the entire setup using preview mode, and publish the container.

Step 1: Get your Microsoft UET Tag ID

The UET (Universal Event Tracking) Tag ID is the unique identifier for your tracking tag within Microsoft Advertising. Here's how to find it:

  1. Log in to Microsoft Advertising.

  2. In the top navigation bar, click Tools.

  3. From the dropdown menu, under the Conversion Tracking section, select UET tag.

  4. You will be taken to the UET tags page. In the table, you will see a Tag ID column.
    The number listed there is your UET Tag ID. It typically looks like a 7 to 9-digit number.

You will use this ID in the UET Tag ID field of your server-side Microsoft Advertising tag (Step 4). 

Step 2: Get the Microsoft Click ID (MSCLKID) to server-side Google Tag Manager

  1. First, ensure that the MSCLKID is being added to your URLs:

    1. In your Microsoft Advertising account, go to the main settings by clicking the gear icon.

    2. Navigate to Account level options.

    3. In the Auto-tagging section, ensure the box is checked for Add Microsoft Click ID (MSCLKID) to my landing page URLs. This will automatically append the click ID to all ad traffic.

  2. Now, create a variable in your web GTM container to read this parameter from the URL:

    1. Navigate to your web GTM container and go to Variables.

    2. Under User-Defined Variables, click New.

    3. Name the variable something clear, like URL - msclkid.

    4. For Variable Configuration, choose URL.

    5. Set the Component Type to Query.

    6. Set the Query Key to msclkid.

    7. Click Save.

  3. Finally, include this new variable in the data you send to your server-side GTM container. You will add it as a parameter to your main Google Tag: GA4 Configuration tag (or GA4 Event tags).

    1. In your web GTM container, navigate to Tags.

    2. Open your primary GA4 Configuration tag (the one that sends data to your server container).

    3. Under Configuration Settings, expand the Fields to Set section.

    4. Click Add Row.

    5. Set the Field Name to msclkid.

    6. Set the Value to your new variable: {{URL - msclkid}}.

    7. Save your tag, test and publish the web container. 

Step 3: Add the Bing Ads Conversion Template

The first step within your server-side GTM container is to add the necessary tag template from the Community Template Gallery.

  1. Navigate to your server-side GTM container.

  2. In the left-hand navigation, click Templates.

  3. Under the Tag Templates section, click Search Gallery.

  4. In the search bar, type Microsoft Advertising or Bing.

  5. Locate the Microsoft Advertising Universal Event Tracking tag.

  6. Click on it and select Add to Workspace, then confirm the permissions.

Step 4: Create the Bing Ads Conversion Tag

Now you'll create and configure the actual tag that will send data to Bing's servers.

  1. Navigate to Tags in the left-hand menu and click New.

  2. Give your tag a descriptive name, such as Server Side - Microsoft Ads UET - Purchase.

  3. Click Tag Configuration and select the Microsoft Advertising Universal Event Tracking template you just added.

  4. Set the following:

    1. UET Tag ID: Enter your Microsoft Advertising UET Tag ID. You can find this in your Microsoft Advertising account (see Step 1). It's best practice to store this in a Constant Variable for easy management.

    2. MSCLKID: Add the Microsoft Click ID you prepared in Step 2 to the field Microsoft Click ID (from the URL) by creating an Event Data Variable containing the parameter msclkid.

    3. Event Type: Choose the event type. For a standard page view, you can leave it as Page Load. For a conversion, select custom.

    4. Additional Parameters: Add additional information to the tag, such as User ID, Page URL or Ecommerce Data, according to the parameters you want to track. 

Step 5: Create the trigger

The trigger tells your new tag when to fire. We will create a trigger that fires only when a specific event, like a purchase, is received by the server container.

  1. Click on the Triggering section within your new tag.

  2. Click the "+" icon in the top-right to add a new trigger.

  3. Give the trigger a name, such as Event - Purchase.

  4. For Trigger Configuration, choose Custom.

  5. Set the trigger to fire on Some Events.

  6. Configure the firing condition: Event Name - equals - purchase.

    Note: The Event Name variable is a built-in variable that captures the en parameter from the incoming GA4 hit. Ensure this matches the event name you are sending from your web container.

  7. Save the trigger and then save the tag.

Step 6: Validate and debug

Testing is a critical step to ensure your architecture works as expected before deploying.

  1. In your server-side GTM container, click Preview.

  2. In a new tab, open your website and trigger the event you configured (e.g., make a test purchase).

  3. Go back to the server-side GTM container’s Preview tab. You should see the incoming request from your browser.

  4. Click on the event in the left-hand summary (e.g., purchase).

  5. Check the tag. In the Tags Fired section, you should see your Server Side - Microsoft Ads UET - Purchase tag.

  6. Inspect the Outgoing Request. Click on the tag itself, then navigate to the Outgoing HTTP Requests tab.
    Here you can inspect the exact request being sent to bat.bing.com. Verify that all parameters (revenue, currency, etc.) are correctly populated. This confirms that your server is successfully sending the conversion data to Microsoft Advertising.

Step 7: Publish

Once you have thoroughly validated that the tag fires correctly and the outgoing data is accurate, you can publish your server-side container.

  1. Click Submit in your server-side GTM workspace.

  2. Provide a version name and a description of the changes you made (e.g., Added Microsoft Ads UET Tag for Purchase Events).

  3. Click Publish.