GTM Overview
Google Tag Manager (GTM) is a tag management system that allows you to deploy and manage marketing tags on your website without modifying code. Using GTM to deploy Bing Ads UET tags provides flexibility and centralized management.
Prerequisites
- Google Tag Manager container installed on your website
- Microsoft Advertising account with UET tag ID
- Admin access to GTM container
Deployment Steps
Step 1: Get UET Tag ID
In Microsoft Advertising, go to Tools → UET tags. Note your UET tag ID (a numeric ID like 123456789).
Step 2: Create Tag in GTM
- In GTM, go to "Tags" → "New"
- Name the tag (e.g., "Bing Ads UET - Page View")
- Choose tag type: "Custom HTML" or use the built-in Microsoft Advertising UET tag template
- If using Custom HTML, paste the UET tag JavaScript
Step 3: Configure Trigger
Set the trigger to "All Pages" (or "Window Loaded") for the base page view tag.
Step 4: Create Conversion Event Tags
Create separate tags for each conversion event:
| Tag Name | Trigger | Custom HTML |
|---|---|---|
| UET - Purchase | Thank You Page URL | uetq.push({event: 'purchase', ...}) |
| UET - Add to Cart | Click on Add to Cart button | uetq.push({event: 'add_to_cart', ...}) |
| UET - Lead | Form submission | uetq.push({event: 'lead', ...}) |
Step 5: Publish and Verify
- Click "Submit" in GTM to publish changes
- Use UET Tag Helper extension to verify tags fire correctly
- Check "Preview" mode in GTM to debug tag firing
Custom HTML Example
<script>
window.uetq = window.uetq || [];
window.uetq.push({
'ec': 'purchase',
'ea': 'order_complete',
'el': 'Order #' + orderId,
'ev': orderValue,
'gv': orderValue,
'gc': 'USD'
});
</script>
Advantages of GTM Deployment
- No code changes needed: Deploy and update tags from GTM interface
- Version control: Roll back tag changes easily
- Testing: Preview mode for debugging before publishing
- Centralized management: Manage all marketing tags in one place
Related: For platform-specific UET deployment guides, see Shopify Plus, Shoplazza, Shopline, and WordPress.