Universal Event Tracking (UET) lets you track user actions on your website and measure campaign performance in Microsoft Advertising. Follow these steps to add your UET tag to your Shopify store.
Prerequisites
Before you begin:
-
You’ve connected your Microsoft Ads account.
-
You’ve created a UET tag using the “Create UET Tag” button in the setup flow.
-
You can access your Shopify theme code.
Step 1: Copy Your UET Tag Code
-
In the UET Tag & tracking setup step of your setup flow, locate the JavaScript snippet under “Manual UET Tag Installation.”
-
Click the Copy button to copy the full UET script.
Step 2: Add the UET Tag to Your Shopify Theme
-
Log into your Shopify admin panel.
-
Go to Online Store > Themes.
-
Click Actions > Edit code for your active theme.
-
Under the Layout folder, select
theme.liquid
.Step 3: Find the Closing
</head>
Tag-
Use CMD + F (Mac) or CTRL + F (Windows) to open the search bar.
-
Type
</head>
(be sure to include the forward slash/
).⚠️ Don't search for
<head>
— that's the opening tag. You must add your script before the closing</head>
tag.
Step 4: Paste the UET Tag Code
-
Locate the
</head>
tag. -
On the line immediately above
</head>
, paste the entire UET tag script you copied earlier. - If there's already code above
</head>
, hit Enter to create a new empty line and paste your tag there — do not overwrite or delete existing code.
-
Final Checks Before Saving
🔍 Double-Check:
-
You added the script above
</head>
, not inside or below it. -
You did not delete or alter any existing code or brackets (
<
,>
,{
,}
). -
The pasted script starts with
<script>
and ends with</script>
.
Save Your Changes:
-
Click Save at the top right.
Need Help?
Reach out to our support team if:
-
You're unsure where to paste the code.
-
You want help with advanced conversion tracking.
-
You see an error after saving.