LinkedIn Insight Tag with Cookie Compliance

Cookbook · guide Last verified View raw markdown (for agents)

In short: keep the Cookie Compliance snippet as the first script in <head>, then paste the Insight Tag below it — in <head> or where LinkedIn places it. The banner holds the recognised Insight loader until the visitor allows Site Optimisation, in regions whose rule requires consent first.

You need #

Where it goes #

LinkedIn prefers the tag right before the end of <body> in the global footer. That is fine: it is still below the banner snippet. You can also place it in <head> under the Cookie Compliance snippet. Paste the Insight Tag exactly as Campaign Manager gives it: it names the insight.min.js loader, and the banner holds the whole inline block because of that.

What the order controls #

The banner recognises the insight.min.js loader (lms-analytics/insight.min.js) and holds it under category 3 Site Optimisation by default. The whole inline block is held when it names that address. In regions whose rule requires consent first, the tag waits until the visitor allows that category; it starts after Allow. A script placed above the banner snippet runs straight away.

Confirm the result #

View the page source: the banner snippet comes first in <head>, and the Insight Tag is below it (in <head> or before </body>). Before choosing, in a region whose rule requires consent first, the held script shows type="javascript/blocked" in the Elements panel. After Allow, the script runs. The tag's cookies are mostly on LinkedIn's own domain, so confirm by the Elements-panel type, not the cookie jar. Browser checks: plain-html; full procedure: verify-install.

Gotchas #

More help #