Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.upstackdata.com/llms.txt

Use this file to discover all available pages before exploring further.

The msclkid (Microsoft Click ID) is a unique identifier appended to your landing page URLs when users click on Microsoft Advertising ads. Upstack captures this click ID and includes it with server-side events for accurate attribution.

How msclkid works

  1. User clicks your Microsoft ad
  2. Microsoft appends msclkid=XXXXXXXX to the landing page URL
  3. Upstack Pixel captures the msclkid from the URL
  4. Upstack stores the msclkid in a first-party cookie
  5. When the user converts, Upstack sends the msclkid with the server-side event
  6. Microsoft matches the event to the original ad click
Auto-tagging automatically appends msclkid to all ad click URLs. This is the recommended approach.
1

Sign in to Microsoft Advertising

Go to ads.microsoft.com and sign in to your account.
2

Navigate to Account Settings

Click on your account name in the top navigation → Account settings.
3

Enable Auto-tagging

Under Tracking, find the Auto-tagging option.Toggle it ON to automatically append msclkid to all ad URLs.
4

Save changes

Click Save to apply the setting.

Manual tracking (alternative)

If you need manual control over click ID tracking, add the msclkid parameter to your campaign tracking templates.

Campaign-level tracking template

Add to your campaign’s Tracking template field:
{lpurl}?msclkid={msclkid}
Or if you already have URL parameters:
{lpurl}&msclkid={msclkid}

Account-level tracking template

Apply to all campaigns by setting the template at the account level:
  1. Go to Account settingsTracking
  2. Add your tracking template with the {msclkid} parameter

Verify msclkid is working

1

Click one of your ads

Search for a term that triggers your ad and click through to your landing page.
2

Check the URL

Look at the URL in your browser. You should see msclkid=XXXXXXXX as a URL parameter.Example: https://yourstore.com/products/item?msclkid=abc123def456...
3

Check Upstack Pixel Helper

If you have the Upstack Pixel Helper installed, open it and verify that the msclkid is being captured.

Troubleshooting

Common causes:
  • Auto-tagging is disabled — enable it in Account settings
  • Final URL excludes query parameters — check your ad configuration
  • Landing page redirects strip parameters — ensure redirects preserve query strings
Check these:
  • Upstack Pixel is installed and active on your landing page
  • No JavaScript errors blocking the Upstack Pixel
  • Cookie consent is granted (if using consent mode)
Verify:
  • The destination is configured with the correct UET Tag ID
  • Event Goals are created in Microsoft Advertising
  • Events are reaching Microsoft (check UET Tag Status)
Upstack stores the msclkid in a first-party cookie to preserve attribution across sessions. The cookie persists for 90 days by default, matching Microsoft’s conversion attribution window.
Privacy considerations: First-party cookies are more resilient to browser restrictions than third-party cookies, but may still be affected by ITP (Safari) and other privacy features. Server-side delivery helps maintain attribution accuracy in these cases.

Next steps

Once msclkid tracking is enabled: