Implementing the LinkedIn Insight Tag for Conversion Tracking
Learn how to correctly add the LinkedIn Insight Tag to your site, verify it works, and avoid common pitfalls that prevent conversion tracking.
05 Jul 2025, 14:49 UTC

Quick Answer
To start collecting LinkedIn conversion data, place a single JavaScript snippet that loads LinkedIn’s analytics library and sends your partner ID with every page view. Replace the placeholder ID with the one found in Campaign Manager, insert the snippet just before the closing tag on every page, and verify the request in your browser’s network tab.
How the Tag Works
The LinkedIn Insight Tag is a lightweight (insight.min.js) file hosted at https://snap.licdn.com/li.lms-analytics/. When the script loads, it creates a global LinkedIn object, reads the _linkedin_data_partner_ids variable (if present) or a default partner ID, and then periodically sends page‑view and custom‑event data to LinkedIn’s analytics endpoint over HTTPS. The data appears in Campaign Manager after a short latency (usually under 24 hours), enabling matched audiences, conversion reporting, and ROI optimization.
Step‑by‑Step Implementation Example
-
Locate your partner ID in Campaign Manager under Account Assets → Insight Tag. It is a numeric string, e.g.,
1234567. -
Add the following snippet to every page of your site, right before the closing tag. If you manage multiple LinkedIn accounts, replace the array with your IDs; otherwise keep a single value.
<!-- LinkedIn Insight Tag --> <script type="application/javascript"> window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || []; window._linkedin_data_partner_ids.push(YOUR_PARTNER_ID); </script> <script type="application/javascript" src="https://snap.licdn.com/li.lms-analytics/insight.min.js"> </script> <!-- End LinkedIn Insight Tag -->Replace
YOUR_PARTNER_IDwith the numeric ID from step 1. No additional configuration is required for basic page‑view tracking. -
Optional: To track a custom conversion (e.g., a form submission), call
LinkedIn.track()after the tag has loaded:LinkedIn.track("CONVERSION_ID", { value: 0.00, currency: "USD" });Replace
CONVERSION_IDwith the ID generated in Campaign Manager for that specific conversion.
Verification Steps
- Open the page in Chrome/Firefox, open Developer Tools → Network.
- Filter for
insight.min.jsorli.lms-analytics. Confirm the request URL contains your partner ID, e.g.,.../insight.min.js?partnerId=1234567. - Check the Console for any 404, CSP, or
LinkedIn is not definederrors. - In Campaign Manager, go to Insight Tag → Domains. Your domain should show a status of Active and recent page‑view counts (may take a few minutes to appear).
Limits and Common Mistakes
Limits
- The tag only works over HTTPS; HTTP pages will not load the script due to mixed‑content blocking.
- Users who have opted out of LinkedIn advertising, disabled third‑party cookies, or run strict ad‑blockers will not be tracked.
- Data latency is typically under 24 hours; real‑time reporting is not available.
- Only one Insight Tag instance per domain is recommended unless you intentionally use the
_linkedin_data_partner_idsarray for multiple partner IDs.
Common Mistakes
- Incorrect or missing partner ID: Results in no data being sent. Double‑check the numeric ID matches your Campaign Manager account.
- Placing the snippet inside a hidden iframe or before the DOM is ready: The script may fail to execute. Always insert it after the HTML is parsed, ideally just before .
- Duplicate snippets: Leads to double‑counted page views and inflated metrics. Ensure only one tag loads per page unless you are deliberately sending data to multiple partner IDs.
- Blocking by Content Security Policy (CSP): If your site enforces a CSP, add
https://snap.licdn.comto thescript-srcandconnect-srcdirectives.
When to Avoid or Remove the Tag
If you are not running LinkedIn Ads or do not need conversion data, removing the tag eliminates unnecessary external requests and reduces potential privacy concerns. Simply delete the snippet from your templates; no further cleanup is required because the tag does not set persistent cookies on your domain.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.