Your LinkedIn Insight Tag should be tracking website visitors and conversions for your B2B campaigns. But the Campaign Manager shows no data, conversions aren’t recording, or the tag helper says it’s not installed. Here’s how to fix it.
Understanding the LinkedIn Insight Tag
The LinkedIn Insight Tag does three things:
- Website Demographics: See which companies visit your site
- Conversion Tracking: Measure leads, purchases, and other actions
- Retargeting: Build audiences of website visitors
If any of these aren’t working, the tag has issues.
Step 1: Verify Basic Installation
First, check if the tag is present and loading.
Check in Browser DevTools:
// In console, check for LinkedIn partner ID:
console.log(window._linkedin_data_partner_ids);
// Should return: ['123456'] (your partner ID)
// Check for insight tag function:
console.log(typeof window.lintrk);
// Should return: 'function'
Check Network Requests:
- Open DevTools → Network tab
- Filter by “linkedin” or “px.ads.linkedin.com”
- Reload the page
- Look for successful requests (200 status)
Expected requests:
px.ads.linkedin.com/collect/... (200)
snap.licdn.com/li.lms-analytics/insight.min.js (200)
If these requests are missing or failing, the tag isn’t loading.
Step 2: Use LinkedIn Tag Helper
LinkedIn provides a browser extension for debugging:
- Install “LinkedIn Insight Tag Helper” from Chrome Web Store
- Visit your website
- Click the extension icon
- Check the status:
Green checkmark: Tag detected and working Yellow warning: Tag detected but issues found Red X: Tag not detected
The helper shows specific issues like:
- Wrong partner ID
- Tag not initialized
- Conversion events not firing
Step 3: Common Installation Issues
Issue 1: Tag Code Placed Incorrectly
The Insight Tag MUST be placed in the <head> section, not footer:
<head>
<!-- LinkedIn Insight Tag -->
<script type="text/javascript">
_linkedin_partner_id = "123456";
window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];
window._linkedin_data_partner_ids.push(_linkedin_partner_id);
</script>
<script type="text/javascript">
(function(l) {
if (!l){window.lintrk=function(a,b){window.lintrk.q.push([a,b])};
window.lintrk.q=[]}
var s = document.getElementsByTagName("script")[0];
var b = document.createElement("script");
b.type = "text/javascript";b.async = true;
b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js";
s.parentNode.insertBefore(b, s);})(window.lintrk);
</script>
<noscript>
<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=123456&fmt=gif" />
</noscript>
<!-- End LinkedIn Insight Tag -->
</head>
Issue 2: Wrong Partner ID
Your Partner ID must match your LinkedIn Ads account:
- Go to LinkedIn Campaign Manager
- Account Assets → Insight Tag
- Copy the Partner ID (numeric, e.g., “123456”)
- Verify it matches the ID in your tag code
Issue 3: GTM Installation Errors
If using Google Tag Manager:
- Use the official LinkedIn Insight Tag template from the Community Gallery
- Or configure a Custom HTML tag:
<script type="text/javascript">
_linkedin_partner_id = "{{LinkedIn Partner ID}}";
window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];
window._linkedin_data_partner_ids.push(_linkedin_partner_id);
(function(l) {
if (!l){window.lintrk=function(a,b){window.lintrk.q.push([a,b])};
window.lintrk.q=[]}
var s = document.getElementsByTagName("script")[0];
var b = document.createElement("script");
b.type = "text/javascript";b.async = true;
b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js";
s.parentNode.insertBefore(b, s);})(window.lintrk);
</script>
<noscript>
<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid={{LinkedIn Partner ID}}&fmt=gif" />
</noscript>
Trigger: All Pages (Page View)
Step 4: CSP (Content Security Policy) Blocks
Content Security Policy headers can block the LinkedIn tag. Check the console for errors like:
Refused to load the script 'https://snap.licdn.com/...' because it violates
the following Content Security Policy directive: "script-src 'self'"
Fix: Update Your CSP
Add LinkedIn domains to your CSP header:
Content-Security-Policy:
script-src 'self' https://snap.licdn.com;
img-src 'self' https://px.ads.linkedin.com;
connect-src 'self' https://px.ads.linkedin.com;
Or in meta tag:
<meta http-equiv="Content-Security-Policy"
content="script-src 'self' https://snap.licdn.com;
img-src 'self' https://px.ads.linkedin.com;">
Step 5: Ad Blocker Issues
Ad blockers frequently block LinkedIn tracking. This affects:
- 15-30% of B2B website visitors
- Higher rates for tech-savvy audiences
- Cannot be fully prevented client-side
Verify Ad Blocker Impact:
- Test your site with ad blockers disabled
- Check if tag loads normally without blockers
- If yes, ad blockers are reducing your data
Mitigations:
- Accept some data loss: Ad blocker users won’t be tracked
- Server-side tracking: Implement LinkedIn Conversions API (more complex)
- First-party proxy: Route through your domain (advanced)
Step 6: Single-Page Application (SPA) Issues
React, Vue, Angular, and other SPAs require special handling.
The Problem:
SPAs don’t trigger traditional page loads. The Insight Tag only fires on initial load.
The Fix:
Fire the tag on virtual page views:
// React Router example
import { useEffect } from 'react';
import { useLocation } from 'react-router-dom';
function App() {
const location = useLocation();
useEffect(() => {
// Fire LinkedIn page view on route change
if (window.lintrk) {
window.lintrk('track');
}
}, [location]);
return <Routes>...</Routes>;
}
// Vue Router example
router.afterEach((to, from) => {
if (window.lintrk) {
window.lintrk('track');
}
});
// Angular example
this.router.events.pipe(
filter(event => event instanceof NavigationEnd)
).subscribe((event) => {
if (window.lintrk) {
window.lintrk('track');
}
});
Step 7: Conversion Tracking Issues
If the base tag works but conversions aren’t tracking:
Verify Conversion Setup in Campaign Manager:
- Campaign Manager → Analyze → Conversion Tracking
- Check that conversions are defined
- Note the conversion ID for each conversion
Event-Specific Conversion Code:
// Fire a conversion event
window.lintrk('track', { conversion_id: 1234567 });
Common Conversion Issues:
Issue: Conversion not firing
// Debug: Check if lintrk is available
console.log('lintrk available:', typeof window.lintrk);
// Wrap in check:
if (typeof window.lintrk === 'function') {
window.lintrk('track', { conversion_id: 1234567 });
} else {
console.error('LinkedIn Insight Tag not loaded');
}
Issue: Conversion fires but not recorded
- Conversion ID might be wrong
- Campaign Manager may have 24-48 hour delay
- Check that conversion is associated with a campaign
Issue: Duplicate conversions
// Prevent duplicate fires
let linkedInConversionFired = false;
function trackLinkedInConversion() {
if (linkedInConversionFired) return;
if (window.lintrk) {
window.lintrk('track', { conversion_id: 1234567 });
linkedInConversionFired = true;
}
}
Step 8: GTM Conversion Tracking
For conversion tracking via GTM:
Create a Custom HTML Tag:
<script>
window.lintrk('track', { conversion_id: {{LinkedIn Conversion ID}} });
</script>
Create a GTM Variable:
- Variable type: Constant
- Name: LinkedIn Conversion ID
- Value: Your conversion ID (e.g., 1234567)
Set the Trigger:
- Trigger type depends on your conversion:
- Form submission → Form Submission trigger
- Thank you page → Page View trigger with URL match
- Button click → Click trigger
Verify in GTM Preview:
- Open Preview mode
- Trigger your conversion action
- Check that the LinkedIn conversion tag fires
- Verify no JavaScript errors
Step 9: Testing Conversions
Method 1: LinkedIn Tag Helper
- Complete a conversion action
- Click the Tag Helper extension
- Look for “Conversion Event Detected”
Method 2: Network Tab
- Open DevTools → Network
- Complete conversion action
- Filter by “linkedin”
- Look for request to
px.ads.linkedin.com/collectwith conversion parameters
Method 3: Campaign Manager
- Wait 24-48 hours (LinkedIn has reporting delays)
- Check Conversion Tracking in Campaign Manager
- Look for test conversions
Step 10: Website Demographics Not Showing
If conversions work but you can’t see company demographics:
Requirements:
- At least 300 page views in the last 30 days
- LinkedIn must be able to match visitors to companies
- Some industries/regions have lower match rates
Check Demographics Access:
- Campaign Manager → Analyze → Website Demographics
- Select your Insight Tag
- Check the date range (last 30 days minimum)
Why Demographics Might Be Empty:
- Insufficient traffic volume
- Visitors not logged into LinkedIn
- Privacy settings blocking tracking
- New tag (needs 2-4 weeks of data)
LinkedIn Insight Tag Checklist
- Tag code in
<head>section - Partner ID is correct
- No CSP blocking (check console)
- Tag Helper shows green status
- Network requests successful
-
window.lintrkfunction exists - SPA page views tracked (if applicable)
- Conversion IDs match Campaign Manager
- Conversions fire on correct triggers
- 24-48 hours allowed for data to appear
Complete GTM Setup Example
Here’s a complete GTM setup for LinkedIn:
Tag 1: LinkedIn Insight Tag (Base)
- Type: Custom HTML
- Trigger: All Pages
<script type="text/javascript">
_linkedin_partner_id = "YOUR_PARTNER_ID";
window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];
window._linkedin_data_partner_ids.push(_linkedin_partner_id);
(function(l) {
if (!l){window.lintrk=function(a,b){window.lintrk.q.push([a,b])};
window.lintrk.q=[]}
var s = document.getElementsByTagName("script")[0];
var b = document.createElement("script");
b.type = "text/javascript";b.async = true;
b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js";
s.parentNode.insertBefore(b, s);})(window.lintrk);
</script>
Tag 2: LinkedIn Lead Conversion
- Type: Custom HTML
- Trigger: Form Submission OR Thank You Page View
<script>
if (typeof window.lintrk === 'function') {
window.lintrk('track', { conversion_id: YOUR_CONVERSION_ID });
}
</script>
Trigger: Lead Form Submission
- Type: Form Submission
- Conditions: Page URL contains “/contact” (adjust to your form page)
Still Having Issues?
LinkedIn tracking has many potential failure points—from CSP policies to ad blockers to SPA navigation issues. If you’ve tried everything above:
- Your site architecture might have unique blocking issues
- Multiple tag managers could be conflicting
- Server-side configuration might be interfering
Get a free LinkedIn tracking audit and we’ll identify exactly what’s preventing your Insight Tag from working properly.