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.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.
How msclkid works
- User clicks your Microsoft ad
- Microsoft appends
msclkid=XXXXXXXXto the landing page URL - Upstack Pixel captures the
msclkidfrom the URL - Upstack stores the
msclkidin a first-party cookie - When the user converts, Upstack sends the
msclkidwith the server-side event - Microsoft matches the event to the original ad click
Enable Auto-tagging (recommended)
Auto-tagging automatically appendsmsclkid to all ad click URLs. This is the recommended approach.
Sign in to Microsoft Advertising
Go to ads.microsoft.com and sign in to your account.
Enable Auto-tagging
Under Tracking, find the Auto-tagging option.Toggle it ON to automatically append msclkid to all ad URLs.
Manual tracking (alternative)
If you need manual control over click ID tracking, add themsclkid parameter to your campaign tracking templates.
Campaign-level tracking template
Add to your campaign’s Tracking template field:Account-level tracking template
Apply to all campaigns by setting the template at the account level:- Go to Account settings → Tracking
- Add your tracking template with the
{msclkid}parameter
Verify msclkid is working
Click one of your ads
Search for a term that triggers your ad and click through to your landing page.
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...Check Upstack Pixel Helper
If you have the Upstack Pixel Helper installed, open it and verify that the
msclkid is being captured.Troubleshooting
msclkid not appearing in URLs
msclkid not appearing in URLs
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
msclkid appearing but not being tracked
msclkid appearing but not being tracked
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)
Attribution not working despite msclkid
Attribution not working despite msclkid
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)
Cookie persistence
Upstack stores themsclkid 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.