Loading tutorials…
Loading tutorials…
The Insight Tag powers conversion tracking, Matched Audiences, and retargeting. Install it wrong and every downstream campaign optimizes against bad data. This walks through all three install paths and the validation step 80% of guides skip.
Who this is forAnyone running or about to run LinkedIn Ads. If the Insight Tag is not installed or not firing correctly, you cannot retarget website visitors, you cannot build Matched Audiences, and your conversion data is missing 60-80% of attribution.
What you'll need
Step 1
Three valid paths: direct (paste code in site header), Google Tag Manager (recommended for most), or partner platform (Shopify, WordPress, HubSpot built-in).
Option A — Direct install. Copy the Insight Tag JavaScript and paste into your site's <head> section. Works on any site but requires code access and is hard to update.
Option B — Google Tag Manager. Install via a GTM tag template. Easiest to maintain, supports event tracking, and lets non-developers update the tag.
Option C — Partner platform. Native integrations exist for Shopify, WordPress, HubSpot, and Wix. Easiest install but limited event flexibility.
Recommendation: GTM if you have it (or are willing to set it up). It is the most flexible long term and supports conversion event triggers that the direct method cannot.
This tutorial walks all three. Skip to the section that matches your stack.
Step 2
Campaign Manager → Account assets → Insight Tag. Copy the JavaScript snippet or your Partner ID.
Open Campaign Manager → top nav → "Account assets" → "Insight Tag."
You will see your Partner ID (a 6-digit number like 123456) and the JavaScript snippet.
Click "Install my Insight Tag" → choose between "I will install the tag myself" (gives you raw JS) or "I will send instructions to my developer" (emails the snippet).
Copy the Partner ID — you will need it whether you install direct, via GTM, or via a partner platform.
Keep this tab open. You will return to it for validation in step 5.
Step 3
Paste the JavaScript snippet immediately before the </head> tag on every page of your site.
Open your site's template — for static sites, this is usually layout.html or _document.tsx. For WordPress without a partner plugin, edit header.php.
Locate the </head> closing tag.
Paste the full Insight Tag JavaScript snippet immediately before </head>.
For Next.js: use next/script with strategy="afterInteractive" in your root layout, not a direct <script> tag in Head — direct tags can be stripped on hydration.
For React SPAs: ensure the tag is in the initial HTML, not appended after React mounts. LinkedIn does not retroactively scan client-rendered code.
Deploy. The tag must be live on all pages — not just landing pages — for retargeting to work.
Step 4
GTM → Tags → New → LinkedIn Insight Tag template → enter Partner ID → fire on All Pages.
Open your GTM workspace → Tags → "New."
Click "Tag Configuration" → search "LinkedIn Insight Tag" in the gallery. Use the official LinkedIn template (verified badge).
Enter your Partner ID from Campaign Manager.
Triggering: select "All Pages" (built-in trigger). This fires the tag on every pageview.
Name the tag clearly: "LinkedIn — Insight Tag." Save.
Click "Submit" → publish the workspace. The tag goes live within 1-2 minutes of publish.
For Single Page Apps (React, Vue, Next.js): also create a "History Change" trigger and a separate tag firing the LinkedIn pageview event on history change. Without this, virtual pageviews are missed.
Step 5
Shopify, WordPress, HubSpot, and Wix all have native integrations. Connect via Campaign Manager → Account assets → Insight Tag → "Choose a platform partner."
Campaign Manager → Account assets → Insight Tag → "Choose a platform partner."
Pick your platform. LinkedIn will redirect you to OAuth-authorize the connection.
For Shopify: install the LinkedIn Sales Channel app from the Shopify App Store. Connect your LinkedIn ad account. The Insight Tag installs automatically across all theme pages.
For WordPress: install the official "LinkedIn Insight Tag" plugin or use a tag manager plugin like Site Kit by Google with LinkedIn extension. Enter Partner ID and activate.
For HubSpot: HubSpot → Marketing → Ads → Connect ad account. Enter Partner ID; HubSpot installs the tag in its tracking script.
Partner platforms typically install in 5-10 minutes but offer less control over event customization than GTM.
Step 6
Use the LinkedIn Insight Tag Helper Chrome extension AND check Campaign Manager → Account assets → Insight Tag → Domains for "Active" status.
Install the "LinkedIn Insight Tag Helper" Chrome extension from the Chrome Web Store. Open your site. The extension icon turns green if the tag fires correctly.
In Campaign Manager → Account assets → Insight Tag → "Domains," your domain should appear with status "Active" within 24 hours of first firing.
If status shows "Inactive" after 48 hours: check the Chrome extension to see what is blocked. Common culprits: CSP headers blocking *.linkedin.com, ad blockers in your test browser, tag installed but trigger condition never met.
For a deeper check: open Chrome DevTools → Network tab → filter "px.ads.linkedin.com." Refresh the page. You should see a network call to this domain with a 200 or 204 status. No call = tag is not firing.
Run validation from at least one mobile device too — mobile-only failures happen and are easy to miss from desktop.
Common mistakes
Installing in <body> instead of <head>
What goes wrong: Tag fires after first-paint. Visitors who bounce in under 2 seconds (typically 30-40% of paid traffic) are not tracked. Retargeting audiences are missing the warmest segment.
How to avoid: Move the tag to <head>, immediately before </head>. For Next.js, use next/script with strategy="afterInteractive" in root layout. Verify with the Insight Tag Helper extension.
Not firing on SPA history changes
What goes wrong: React, Vue, Next.js, and other SPAs change pages without a full page reload. The Insight Tag does not auto-detect this. Virtual pageviews are lost — typically 60-70% of session events.
How to avoid: In GTM, add a History Change trigger that fires the LinkedIn pageview event. For direct installs, manually call window._linkedin_partner_id and the pageview function on route change.
CSP headers blocking LinkedIn domains
What goes wrong: Modern security headers (especially on Next.js production deployments) block third-party scripts by default. Tag appears installed but no data reaches LinkedIn. Reports show zero visitors.
How to avoid: Whitelist *.linkedin.com in your CSP script-src and connect-src directives. Test by checking Network tab for px.ads.linkedin.com calls after deployment.
Tag installed only on landing pages
What goes wrong: Visitors who navigate to /pricing or /blog are not added to Matched Audiences. Retargeting only catches the people who already converted on the first visit — exactly the wrong segment.
How to avoid: Install in the site-wide header template, not on individual pages. Verify by visiting 5-10 different pages and confirming the Insight Tag Helper turns green on each.
Multiple Insight Tags from different accounts
What goes wrong: Agencies often install their own tag and forget to remove a client's previous tag. Both fire, both report data, audiences cross-contaminate, and Conversion API events get attributed to the wrong account.
How to avoid: Audit the page source for "_linkedin_partner_id" — there should be exactly one. Remove any stale partner IDs. Coordinate with previous agencies to verify.
No validation step
What goes wrong: Tag "looks installed" but never validated end-to-end. Three weeks later, the team discovers Matched Audiences are empty and conversion events show zero. Three weeks of ad spend optimized against nothing.
How to avoid: After every install or template change, run: Chrome extension check + Network tab check + Campaign Manager domain status. All three must confirm before trusting the data.
Recap
Done — what's next
How to set up LinkedIn Ads Campaign Manager the right way
Read the next tutorial
Hand it off
Insight Tag installation looks simple, but the failure modes are quiet. CSP headers, SPA navigation, and partial firing are the three most common reasons B2B teams launch LinkedIn campaigns with broken tracking. A LinkedIn Ads specialist will install, validate, and set up conversion events in 1-2 hours — typically $20-40. Compare that to 3 weeks of wasted spend.
See specialist rates
After first valid firing, the domain status updates in Campaign Manager → Account assets → Insight Tag → Domains within 24 hours. If it still shows "Inactive" after 48 hours, the tag is not firing correctly — check CSP, ad blockers, and SPA routing.
Yes. They are independent tags and do not conflict. Install both via GTM for cleanest setup — each gets its own tag, both fire on All Pages, no interference.
Yes, but you must use next/script with strategy="afterInteractive" in your root layout. Do not place raw <script> in next/head — Next.js can strip it during hydration. For App Router, place the Script component in the root layout.tsx.
Three possibilities in order: (1) CSP headers blocking the px.ads.linkedin.com connection — check Network tab for failed/blocked requests; (2) ad blocker in your test browser silently dropping the request; (3) Campaign Manager dashboard lag — the dashboard updates every 6-12 hours, real-time data does not exist for the Insight Tag.
Before. The Insight Tag needs 7-14 days of data collection to populate Matched Audiences. If you launch campaigns first, your first two weeks of spend cannot use retargeting or website-visitor audiences — that is 40-50% of LinkedIn's value gone.
Not for the form fill itself (LinkedIn tracks Lead Gen Form conversions natively). But you need the Insight Tag to build retargeting audiences of people who visited your site, viewed the form, or completed it — which is how you build qualified MOFU/BOFU audiences.
LinkedIn Ads
LinkedIn Campaign Manager has more configuration traps than any other ad platform. Get the account, billing, and access model right the first time — or you will be unwinding it for months.
LinkedIn Ads
Matched Audiences are LinkedIn's answer to retargeting — and they are what separates serious B2B campaigns from spray-and-pray. This walks through every audience type, the real match rates, and how to use each one.
LinkedIn Ads
LinkedIn conversion tracking has more moving parts than Meta or Google — Insight Tag events, offline conversions API, attribution windows, and view-through controls. Get this right or your bid optimization runs on fog.
LinkedIn Ads
DIY LinkedIn Ads is a fine idea — until it isn't. This is the honest framework: when the cost of self-managing exceeds the cost of hiring, and how to tell which side you're on.