f in x
LinkedIn Insight Tag with GTM – B2B Tracking at Low Cost
> cd .. / HUB_EDITORIALE
Seo e analitica

LinkedIn Insight Tag with GTM – B2B Tracking at Low Cost

[2026-07-03] Author: Ing. Calogero Bono
Zenithby Meteora Web The operating system for your business. Social, clients, bookings and invoices in one platform. Gyms, barbers, professionals. Discover Zenith Free demo · no card

You spent budget on LinkedIn Ads and your sales rep asks: "How many leads came from that campaign?" If you don't have proper tracking, the answer is "maybe", "I don't know", or worse, a made‑up number. At Meteora Web, we see companies throwing money at LinkedIn campaigns every day without knowing what happens after the click.

The LinkedIn Insight Tag is the tool that connects ad clicks to actions on your site — conversions, sign‑ups, sales. Installed via Google Tag Manager (GTM), it becomes even more powerful: no need to hack into templates, no risk of breaking the site. In this guide we show you how to make it work for real, and how to extend the same logic to other platforms (Twitter, TikTok, Pinterest).

Why Use GTM for the LinkedIn Insight Tag Instead of Pasting It Manually?

Pasting the LinkedIn Insight Tag directly into <head> works. But it's like putting a patch on a jacket: eventually you need to change something and you end up hacking into the theme. With GTM:

  • You modify the tag without touching a line of HTML.
  • You can fire it only on certain pages (e.g. product pages, not "About Us").
  • You track specific events (button clicks, scroll, form submissions) without writing code.
  • You have versioning: if you make a mistake, you roll back with one click.

We manage projects for clients with WordPress, Laravel, Shopify. In every case, the LinkedIn tag goes through GTM. Why waste time looking for header.php when you can do it in 5 minutes from an interface?

Sponsored Protocol

How to Get Your LinkedIn Insight Tag

Go to LinkedIn Campaign Manager → Account Assets → Insight Tag. Copy the partner ID (a number like 123456). You don't need the whole snippet — only that number matters.

How to Install the LinkedIn Insight Tag in GTM: Step by Step

You don't need to be a developer. Follow these steps and in 10 minutes you'll have the tag active.

1. Create a “LinkedIn Insight” Tag in GTM

From the GTM workspace, click “Add a new tag”. Choose tag type “Custom HTML” (LinkedIn doesn't have a native template in GTM). Paste this code:

<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);
</script>
<script type="text/javascript">
(function(){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);})();
</script>
<noscript>
<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=YOUR_PARTNER_ID&fmt=gif" />
</noscript>

Replace YOUR_PARTNER_ID with your ID. Set the tag to fire on “All Pages” (or only specific pages with a rule like “Page URL contains” if you want to limit it).

Sponsored Protocol

2. Test the Tag Before Publishing

Use GTM Preview: go to “Preview” and visit your site. Check the console that the tag fires. Then go to LinkedIn Campaign Manager → Insight Tag → “Test tag” – if you see “Tag active” you're good. If not, you likely have the wrong ID or the tag didn't fire on the page.

How to Track Specific Conversions (Leads, Purchases) with GTM + LinkedIn

Basic installation is not enough: you want to know how many people who clicked your ad then filled out the form or completed a purchase. In GTM, create a second “LinkedIn Conversion Tracking” tag that fires on an event.

Create a Conversion Trigger on a Thank‑You Page

Suppose after a contact form the user lands on /thank-you. Create a trigger in GTM of type “Page View” with condition “Page URL contains /thank-you”. Then create a new “Custom HTML” tag with this script:

Sponsored Protocol

<script type="text/javascript">
window.lintrk('track', { conversion_id: 1234567 });
</script>

Find the conversion_id in LinkedIn Campaign Manager → Insight Tag → Conversion Tracking. Replace it. Assign the trigger you created (the /thank-you page). Done: every time a user lands there after clicking a LinkedIn ad, the conversion is recorded.

What Other Platforms Can We Track with GTM Using the Same Logic?

The same technique — third‑party tag via Custom HTML plus event trigger — works for dozens of platforms. We use them all in our projects. The most requested ones:

Twitter (X) Pixel

The Twitter Pixel is a simple script that loads twq.js. Install it in GTM with a Custom HTML tag (fire on “All Pages”). Then create separate conversion tags with twq('track', 'SignUp') on specific events. No substantial difference from LinkedIn.

TikTok Pixel

TikTok works the same way: copy the base code (with your pixel_code), paste it into a Custom HTML tag on “All Pages”. For conversions, use ttq.track('CompletePayment') on a purchase trigger.

Sponsored Protocol

Pinterest Tag

Pinterest uses pinimg.com for the base tag. Same procedure. Note: Pinterest requires the tag to be executed before </head> – in GTM, make sure the tag is loaded with sequencing “All Pages” and no delay.

How to Avoid Common Mistakes with GTM and Third‑Party Tags

We've seen it all: duplicate tags, wrong triggers, already defined JavaScript objects. Here are the three most frequent errors and how to avoid them.

Not Blocking Third‑Party Tags by Ad Blockers

Some ad blockers (uBlock Origin, Ghostery) block domains like snap.licdn.com or analytics.twitter.com. Your tag won't fire for those users. You can't fully bypass it, but you can verify with GTM Preview that the tag fires at least for you (disable your ad blocker during testing).

Forgetting the noscript Fallback for LinkedIn

The LinkedIn Insight Tag requires a <noscript> with an image pixel for browsers without JavaScript. If you omit it, you lose data. In the code above we included it. Double check.

Triggers Not Aligned Between Multiple Tags

If you use LinkedIn, Twitter and TikTok all in GTM, make sure the conversion triggers are independent. A classic mistake: create a “Button Click” trigger and use it for all three tags, then later change the button's CSS class and break the trigger. Keep triggers separate per platform, or use reusable variables.

Sponsored Protocol

What to Do Now

If you've made it this far, you have everything you need to install and manage the LinkedIn Insight Tag with GTM for your business or your clients. Here are the next concrete steps:

  1. Check if you already have a GTM container – otherwise create one free at tagmanager.google.com.
  2. Get your LinkedIn partner ID – go to Campaign Manager, copy it.
  3. Install it in GTM following the steps above. Use Preview to test.
  4. Set up at least one key conversion – thank‑you pages or purchase events.
  5. Verify data in LinkedIn after 24–48 hours. If conversions don't appear, check triggers and GTM console errors.

At Meteora Web, we also wrote the pillar guide on Google Tag Manager – if you want to deepen multi‑tag management, variables and environments.

Remember: a tag not installed correctly is like a security camera that's off. You see nothing, but you still pay for the system.

Ing. Calogero Bono

> AUTHOR_EXTRACTED

Ing. Calogero Bono

Ingegnere informatico, fondatore di Meteora Web e Zenith OS. System administrator e progettista di piattaforme, app e CMS proprietari, con esperienza in sviluppo full-stack, marketing digitale ed ecosistema Google.
[ Read Full Dossier ]

> METEORA_WEB // DIGITAL AGENCY

We build the digital presence your business deserves.

Websites, social media, online advertising, e-commerce and high-performance hosting, engineered with method by computer engineers in Sciacca, for all of Italy.

> MW_JOURNAL

> READ_ALL()