How to set up the LinkedIn Insight Tag with Cookiequiet
The LinkedIn Insight Tag tracks conversions and builds retargeting audiences, and LinkedIn lists cookies such as li_fat_id (30 days) and li_sugr (90 days) for it, so it belongs in the marketing category and should run only after consent. Mark its script with type="text/plain" and data-cq-category="marketing", or fire LinkedIn's Tag Manager template on the cq_consent event when cq_marketing is true. LinkedIn documents no consent switch for the tag, so not loading it is how a refusal is respected.Steps
What does the Insight Tag collect?
LinkedIn describes the Insight Tag as JavaScript that enables campaign reporting, conversion tracking, retargeting of website visitors and aggregate insights about the members who interact with your ads. Its FAQ lists the data sent with each visit: the URL, the referrer, the IP address, browser and device characteristics (user agent) and a timestamp. LinkedIn says IP addresses are truncated or hashed, members' direct identifiers are removed within seven days, and the remaining pseudonymous data is deleted within 180 days. With enhanced matching, hashed email addresses are sent too.
LinkedIn's cookie table lists the cookies its services, the Insight Tag among them, can use on third-party sites. A selection:
| Cookie | Domain | Purpose (from LinkedIn) | Lifetime |
|---|---|---|---|
li_fat_id | your domain | Member indirect identifier for conversion tracking, retargeting, analytics | 30 days |
li_giant | your domain | Indirect identifier for groups of members, for conversion tracking | 7 days |
li_sugr | .linkedin.com | Probabilistic match of a user's identity | 90 days |
UserMatchHistory | linkedin.com | LinkedIn Ads ID syncing | 30 days |
lms_ads, lms_analytics | .linkedin.com | Identify LinkedIn members off LinkedIn for advertising and analytics | 30 days |
bcookie | .linkedin.com | Browser identifier | 1 year |
The tag identifies people for advertising across sites, so it sits in the marketing category in Cookiequiet. LinkedIn also asks advertisers not to install it on pages that collect or contain sensitive data, such as consumer pages about specific medications or where people manage their finances.
How do I load it only after consent?
Option 1: mark the tag. Put the Cookiequiet snippet first in the head, then paste the Insight Tag wherever you like and change its opening script tag:
html<script type="text/plain" data-cq-category="marketing">/* LinkedIn Insight Tag code from Campaign Manager, unchanged */</script>
Cookiequiet runs it when marketing is granted: at once on later visits where the stored choice includes it, and at the moment of the click when the visitor accepts during the visit. If the code you copied ends with a <noscript> image, delete it: an image in plain HTML is requested before any consent script can act. Tags marked for CookieYes or Cookiebot work as they are; see switching from CookieYes.
Option 2: Google Tag Manager. LinkedIn's instructions add the LinkedIn InsightTag 2.0 template from the Community Template Gallery with an All Pages trigger. Swap that trigger for a Custom Event trigger on cq_consent, Some Custom Events, condition cq_marketing equals true, and set Tag firing options to Once per page: Cookiequiet pushes cq_consent on every page load where a choice is stored and after each choice. Adding ad_storage under Require additional consent for tag to fire gives a second check, since Cookiequiet grants ad_storage with the marketing category. The Google Tag Manager guide sets up the variables and triggers.
Tags injected by other scripts. Cookiequiet's auto-blocker lists snap.licdn.com, the host of LinkedIn's script, under marketing, so a copy created by a plugin or a tag manager is held until that category is granted. A tag hard-coded in the HTML without marking runs before Cookiequiet can stop it.
Does LinkedIn have a consent API or Consent Mode?
LinkedIn's Insight Tag documentation describes no consent call, and Google Consent Mode is a Google mechanism. The way to respect a refusal is to keep the tag from loading, which both options above do. Conversion events you send from your own code (for example after a form submission) need the same gate: check that the cq:consent event Cookiequiet dispatches on window listed marketing in detail.categories before calling LinkedIn.
EU-specific points
- LinkedIn says it does not share members' personal data with you and only provides reports that do not identify members. The visitor's data still reaches LinkedIn, so the tag needs prior consent under the ePrivacy rules in the EEA and the UK.
- LinkedIn's FAQ notes that it also receives data from Microsoft's UET tag, and that data from the EEA and Switzerland is excluded from what UET provides. If you run UET, the Microsoft UET consent guide covers it.
- Name LinkedIn in your privacy policy and list its cookies in the cookie policy; the scanner names the tag when it finds it.
How do I test it?
- Open the site in a private window and click Reject all. The network tab shows no request to
snap.licdn.comor any other LinkedIn host, and there is noli_fat_idcookie. - Clear the cookies, click Accept all, reload: the tag loads.
- In Campaign Manager, the Insight Tag status turns active once a visit is recorded; LinkedIn says validation can take from a few minutes to 24 hours.
- Check the consent log in the Cookiequiet dashboard.
Cookiequiet is free for one website with geo-targeting; Starter is €3 per website per month with unlimited pageviews.