Set up UET tags using Google Tag Manager

Set up UET tags using Google Tag Manager

Third-party tag managers allow you to manage your website tags in one place. Learn how to set up UET tags using Google Tag Manager.
Notes
  • This article shows how to do a basic setup of UET tags with Google Tag Manager. Google Tag Manager offers several advanced features to customize when and how your tags are fired. Please refer to Google's Tag Manager Help for more information.
  • Bing Ads is not responsible for Google Tag Manager's processes or documentation, nor for changes made to Google Tag Manager's processes or documentation.

Tag managers replace static tags with dynamic tags that are easier to implement and update. The dynamic tag is a container, a small snippet of code that allows you to dynamically insert tags into your website. You can think of the container tag as a bucket that holds other types of tags.

Implementing UET using Google Tag Manager expando image

To send information from Google Tag Manager to Bing Ads, you need to create a container in Google Tag Manager and then add the Bing Ads UET tag to it. Here's how:

  1. Set up an account in Google Tag Manager.
  2. On the Accounts page, click the three-dot icon and select Create Container.
  3. Click on the newly created container to go to the Workspace page.
  4. Click on the container name (formatted like "GTM-XXXXXX") in the toolbar. You will see the Google Tag Manager container code and instructions.
  5. Copy the container code and paste it into the head or body section of your website's code.
  6. On the Workspace page, click Add a new tag.
  7. Select Tag Configuration and then click Bing Ads Universal Event Tracking.
  8. Enter the Bing Ads UET Tag ID. You can find the tag in Bing Ads by selecting Conversion Tracking > UET tags.
  9. If you have more than one UET tag tracking code on a webpage, enter the UETQ Variable ID. Otherwise, use the default "uetq" value.
    1. Learn more about reasons for creating more than one UET tag and how to rename the uetq event tracker.
    2. Note: If you don’t use a different uetq variable, the UET Tag Helper will return the “Multiple UET tags on this webpage use the same event name” issue.
  10. For Event Type, select Page Load unless you have a custom conversion goal or have set up variable revenue reporting (see the below Advanced section).
  11. Under Triggering, select All pages / Page View, especially if the trigger is for a Page Load event type. A tag must have at least one trigger for it to fire. Triggers are evaluated during runtime and are fired when the trigger conditions are met.
  12. Click Save.
  13. Click Publish to enable the tag and add a version.
  14. In Bing Ads, select Conversion Tracking > UET tags to verify that you are receiving conversions. It typically takes up to 24 hours for a tag to be verified.
  15. Use the UET Tag Helper to validate that the tag is set up correctly in real-time and to troubleshoot issues if the tag is not working.

Advanced: UET custom event and variable revenue reporting using Google Tag Manager expando image
Important

To set up custom events and revenue variables using Google Tag Manager, you must have a UET tracking code in your website's code and have added your UET tag to Google Tag Manager as described in the previous section.

  1. Set up Google Tag Manager variables to read dynamic values from your page: While Google Tag Manager supports many variants (read from html elements, functions, variables, etc.), we'll set up Google Tag Manager variables to read JavaScript variables in this example.
    1. Visit our Google Tag Manager sample page (English only), right-click in the webpage, and then click View source or View page source depending on your browser. You will see the following variables:
      <script>
         var varEventCategory = "MyCategory";
         var varEventAction = "MyAction";
         var varEventLabel = "MyLabel";
         var varEventValue = 5;
         var varRevenue = 6;						
      </script>

      Let's say that you had the same variables in your website, and you wanted Google Tag Manager to read them.
    2. In your Google Tag Manager container's Workspace page, click Variables.
    3. Under User-Defined Variables, click New.
    4. Name this variable "MyCategory" (this is the first of our sample variables).
    5. Under Choose variable type, select JavaScript Variable.
    6. In the Global variable name box, enter the variable — in this case, "varEventCategory".
    7. Repeat the process, creating a new variable for each custom event and variable revenue that you want to track.
  2. Set up a trigger: In your Google Tag Manager container's Workspace page, click Triggers, and then New. Google Tag Manager triggers need to match possible interactions coded on your webpage. For example, on our Google Tag Manager sample page, we have coded for a click on a button. Right-click in the webpage, and then click View source or View page source depending on your browser, and look for the code with "id=btnCustomEvent".
  3. Create a new tag: In your Google Tag Manager container's Workspace page, click Tags, and then New. Add your newly-created variables (step 1) and triggers (step 2).
  4. Publish your changes: In your Google Tag Manager container's Workspace page, click Publish in the upper-right corner.
  5. Check your website's code: Verify that you have updated your website's code with the correct variables to report custom events and variable revenue. In our example:
    <script>
       var varEventCategory = "MyCategory";
       var varEventAction = "MyAction";
       var varEventLabel = "MyLabel";
       var varEventValue = 5;
       var varRevenue = 6;						
    </script>
  6. Validate your tags: Use the UET Tag Helper to confirm that the variable revenue and custom events are being fired.

See more videos...