PrivacyQuick

Google Consent Mode & analytics

LinkedIn Insight Tag and cookie consent

The LinkedIn Insight Tag is an advertising tag: it sets cookies and sends visit data to LinkedIn for conversion tracking and retargeting. For visitors in the EU, EEA, UK and Switzerland, keep it blocked until they accept marketing cookies, and apply the same consent to any server-side conversions you send.

  • Plain English
  • Written for website owners
  • Free to read

Yes, the LinkedIn Insight Tag needs prior consent for visitors from the EU, EEA, UK and Switzerland. It's a piece of JavaScript from LinkedIn that sets cookies and sends details of each visit to LinkedIn so you can measure ad conversions, retarget visitors and see reports on the professional makeup of your audience. None of that is strictly necessary to show your website, so under the ePrivacy rules and the GDPR the tag should stay blocked until a visitor accepts marketing cookies. This guide covers what the tag does, how to block it in plain HTML and in Google Tag Manager, and what that means for LinkedIn's Conversions API.

What the Insight Tag does

You install the Insight Tag once, site-wide, and LinkedIn uses it for three things:

  • Conversion tracking. It records page loads or events, such as a form submission, and attributes them to LinkedIn ad clicks and views.
  • Retargeting. It builds audiences of website visitors that you can show LinkedIn ads to later.
  • Website demographics. It gives you aggregate reports on the job titles, industries and companies of LinkedIn members who visit.

LinkedIn's Insight Tag FAQ says the tag collects the page URL, referrer, IP address, device and browser characteristics (the user agent) and a timestamp. LinkedIn says it truncates or hashes IP addresses, removes members' direct identifiers within seven days and deletes the remaining pseudonymous data within 180 days. If you turn on enhanced matching, the tag can also send email addresses, hashed in the browser before they leave the page. Check the FAQ for the current wording before you describe this in your own privacy policy.

LinkedIn also tells advertisers not to install the tag on pages that collect or contain sensitive data, such as consumer pages about specific medications or pages where people manage bank accounts or medical appointments. That's a contractual restriction from LinkedIn, on top of any consent requirement.

Cookies the Insight Tag uses

LinkedIn publishes a cookie table that lists the cookies its services use on other websites, including the Insight Tag. The ones most relevant to the tag, as listed in late 2026:

CookieDomainPurpose (per LinkedIn)Expiry
li_fat_idYour domain (first-party)Indirect member identifier for conversion tracking, retargeting and analytics30 days
li_giantYour domain (first-party)Indirect identifier for groups of members, for conversion tracking7 days
UserMatchHistorylinkedin.comLinkedIn Ads ID syncing30 days
AnalyticsSyncHistory.linkedin.comRecords when a sync with lms_analytics took place30 days
lms_ads / lms_analytics.linkedin.comIdentify LinkedIn members off LinkedIn for advertising / analytics30 days
li_sugr.linkedin.comProbabilistic match of a user's identity90 days
bcookie.linkedin.comBrowser identifier, used for abuse detection and diagnostics1 year

Whether the third-party cookies on linkedin.com are actually set depends on the visitor's browser, since Safari and Firefox block most third-party cookies by default. The first-party cookies on your own domain are what LinkedIn's enhanced conversion tracking setting relies on. When it's enabled, LinkedIn appends a click ID parameter, li_fat_id, to your landing page URLs after an ad click, and the tag stores it in a first-party cookie of the same name. LinkedIn's developer documentation says the setting is on by default for recently created tags. Cookie names and lifetimes change, so confirm them against LinkedIn's current table and a scan of your own pages.

Two sets of rules apply:

  • ePrivacy Directive Art. 5(3), and national laws that implement it such as the UK's PECR, require consent before you store or read information on a visitor's device, unless it's strictly necessary for a service the visitor asked for. Advertising cookies aren't.
  • GDPR Art. 6(1) requires a legal basis for the personal data the tag sends to LinkedIn. For cross-site ad tracking and retargeting, that basis is in practice consent under Art. 6(1)(a), meeting the conditions in Art. 4(11) and Art. 7.

The tag belongs in your marketing category, not analytics. The demographics reports sound like analytics, but the data goes to an advertising platform and feeds its ad products. The guide to cookie categories explains how to classify tags like this, and tracking pixels explained shows why the rules apply even when a tag sets no cookies at all.

B2B sites often assume this doesn't apply to them because their visitors are professionals. It does. The rules protect the device, whether it's a personal phone or a work laptop, and a named person at a company is still a data subject. See cookie consent for B2B websites for the common myths.

As of late 2026, LinkedIn's help pages for the Insight Tag don't describe a built-in consent API comparable to Meta's or TikTok's. Check LinkedIn's current documentation, but in practice the consent decision has to be made before the tag loads. The cleanest way is to keep the script from running at all until the visitor accepts marketing.

LinkedIn's standard site-wide code looks like this (your partner ID comes from Campaign Manager):

<script type="text/javascript">
_linkedin_partner_id = "1234567";
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=1234567&fmt=gif" />
</noscript>

With PrivacyQuick, you change both scripts to type="text/plain", add data-category="marketing", and delete the <noscript> image:

<script type="text/plain" data-category="marketing">
_linkedin_partner_id = "1234567";
window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];
window._linkedin_data_partner_ids.push(_linkedin_partner_id);
</script>
<script type="text/plain" data-category="marketing">
(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>

Until the visitor allows marketing, the browser treats both blocks as plain text, so nothing is requested from LinkedIn. After consent, they run as normal. The noscript image has to go because it fires for visitors with JavaScript turned off, and those visitors never see a banner. The general technique is covered in how to block cookies and scripts until consent.

Event-specific conversions

If you track a button click or form submission with LinkedIn's event code, the call looks like window.lintrk('track', { conversion_id: 12345 }). Before consent, lintrk doesn't exist, so an unguarded call throws an error. Check for it first:

if (typeof window.lintrk === 'function') {
  window.lintrk('track', { conversion_id: 12345 });
}

If you used LinkedIn's image-pixel version of an event conversion, give it data-src instead of src and data-category="marketing", or switch to the JavaScript event, which LinkedIn recommends anyway for first-party cookie support.

Setting it up in Google Tag Manager

LinkedIn's help center tells GTM users to add the LinkedIn InsightTag 2.0 template from the Community Template Gallery, enter the partner ID and fire it on all pages. Those instructions don't cover consent, so add the gate yourself:

  1. Open the tag and go to Advanced Settings → Consent Settings.
  2. Choose Require additional consent for tag to fire and add ad_storage.
  3. Make sure your consent tool sets ad_storage to granted only when the visitor accepts the category you describe as marketing.
  4. Add a trigger for the event your consent tool pushes when consent changes, so the tag can fire on the page where the visitor accepts, not just the next one.
  5. Apply the same consent check to every LinkedIn event tag in the container.

Leave the GTM container itself unblocked so Google tags can use Consent Mode, and let the consent checks hold back non-Google tags like this one. The full walkthrough is in setting up consent in Google Tag Manager.

A tag that waits for ad_storage only works if ad_storage is denied by default for opt-in regions. If your consent default is missing or granted, GTM will fire the LinkedIn tag before anyone has clicked anything.

LinkedIn's Conversions API lets your server send conversion events, such as a lead or a purchase, directly to LinkedIn, often alongside the Insight Tag. It's useful for offline and CRM conversions and for recovering signals lost to browser restrictions. It doesn't change the legal position, because you're still sending personal data about a visitor to an ad platform for advertising.

  • Only send events for visitors who consented. Read the consent state in the browser and pass it along with the form or order, or read your consent cookie on the server, and skip the API call when marketing wasn't accepted.
  • Gate click ID capture too. LinkedIn's developer docs show how to read li_fat_id from the landing page URL or cookie and pass it with a form so the server can send it to the API. That's an identifier taken from the visitor's device for advertising, so only capture it after consent.
  • Treat hashed emails as personal data. Hashing lets LinkedIn match the address to a member, so it isn't anonymization.
  • Watch integrations. CRM and marketing automation connectors can send leads to LinkedIn without any reference to your banner. List them and check how they handle consent.

The same thinking applies to Meta's server-side events. Our Meta Pixel and GDPR guide covers that in more detail.

Visitors outside Europe

Most US state privacy laws work on an opt-out model. Sending visit data to LinkedIn for retargeting is likely to count as "sharing" for cross-context behavioral advertising under the CCPA, or targeted advertising under other state laws. So US visitors generally need a working opt-out, such as a "Do Not Sell or Share My Personal Information" link, and Global Privacy Control signals should switch the tag off where the law requires it. Canada, Brazil and other regions have their own rules. A regional consent setup lets you apply opt-in where it's required and opt-out elsewhere from one banner.

How to test your setup

  1. Open your site in a private window with DevTools open on the Network tab, and filter for licdn and linkedin.
  2. Before you touch the banner, there should be no request to snap.licdn.com or px.ads.linkedin.com.
  3. In the Application tab, confirm there's no li_fat_id or li_giant cookie on your domain.
  4. Click Accept all. The script should load and send a request to LinkedIn, and the first-party cookies may appear.
  5. In a fresh private window, click Reject all and browse to a conversion page. Nothing should go to LinkedIn.
  6. In Campaign Manager, check that the tag still shows as active after consented visits. LinkedIn shows "Unverified" when it hasn't received a signal.

Next steps

  • Find every copy of the Insight Tag: theme code, tag manager, CMS plugins and marketing tools. A free cookie scan lists the LinkedIn hosts your pages contact.
  • Tag it as marketing, remove the noscript image and guard any lintrk event calls.
  • Keep it off sensitive pages, as LinkedIn's own terms require.
  • Gate Conversions API and CRM integrations on the same consent.
  • Name LinkedIn, its cookies and its purposes in your cookie policy and privacy policy.

PrivacyQuick blocks the tag with the one-attribute change shown above, shows Reject all next to Accept all, and reloads the page if a visitor later withdraws marketing consent so the tag stops running. The script blocking docs cover scripts, iframes and images.

Frequently asked questions

Does the LinkedIn Insight Tag set cookies?

Yes. According to LinkedIn's cookie table, it can set first-party cookies on your domain, such as li_fat_id and li_giant, and LinkedIn uses cookies on its own domain, such as UserMatchHistory, lms_ads and li_sugr, when the tag runs. Run a scan of your own site to see the current list.

Is the LinkedIn Insight Tag analytics or marketing?

Marketing. Even though it powers website demographics reports, its main purposes are ad conversion tracking and retargeting, and the data goes to LinkedIn. Put it in your marketing or advertising category.

Does the Insight Tag respond to Google Consent Mode?

Not by itself. Consent Mode signals only change how Google's own tags behave. In Google Tag Manager you can still require ad_storage as an additional consent check, so the LinkedIn tag fires only when marketing consent is granted.

Can I use the Insight Tag without consent on a B2B website?

Not for visitors in the EU or UK. The cookie rules protect any user's device, including a work laptop, and business contacts are still individuals under the GDPR.

Check your own website in 30 seconds

Our free scanner lists every cookie and tracker your site sets, sorted into categories, before you add a banner.

Run a free cookie scan Start free

This guide is general information, not legal advice. Laws and regulator guidance change; check the current rules for your situation or ask a lawyer.