LinkedIn Insight Tag
The LinkedIn Insight Tag plugin connects Funnel to LinkedIn Ads. It maps Funnel’s
GA4-standard events to LinkedIn conversions and fires them through window.lintrk. LinkedIn
identifies conversions by numeric conversion ID, so each GA4 event you care about must be
mapped to its conversion ID in the plugin config.
What it tracks
Section titled “What it tracks”LinkedIn does not have named standard events. It uses conversion IDs. You supply a
conversionIds map from GA4 event names to your LinkedIn conversion IDs:
| Funnel event (GA4) | |
|---|---|
page_view |
Tracked automatically by the Insight Tag (skipped by Funnel) |
| Any mapped event | lintrk("track", { conversion_id }) |
| Any unmapped event | Dropped (optionally logged when debug: true) |
When an event has both value and currency, Funnel sends a revenue object:
{ value: { currency, amount } }.
Before you start
Section titled “Before you start”- A LinkedIn Partner ID from Campaign Manager.
- One or more conversion IDs created under Campaign Manager → Conversions.
- The LinkedIn Insight Tag base snippet loaded in your page, so
window.lintrkexists before Funnel runs.
Install & initialize
Section titled “Install & initialize”import { Funnel } from "@sunwjy/funnel-client";import { createLinkedInInsightPlugin } from "@sunwjy/funnel-client/linkedin-insight";
export const funnel = new Funnel({ plugins: [createLinkedInInsightPlugin()], debug: true,});
funnel.initialize({ "linkedin-insight": { partnerId: "1234567", conversionIds: { sign_up: 9876543, purchase: 9876544, }, debug: false, // warn on unmapped non-page_view events },});consentRequired: true is optional. When set, events are dropped until ad_storage is
granted through funnel.setConsent(...).
Track an event
Section titled “Track an event”funnel.track("purchase", { currency: "USD", value: 120, transaction_id: "T-2002",});With the mapping above this calls lintrk("track", { conversion_id: 9876544, value: { currency: "USD", amount: 120 } }).
Verify
Section titled “Verify”- Set
debug: trueon the Funnel to log each dispatch in the console. - Use the LinkedIn Insight Tag browser extension to confirm the tag is firing.
- Check conversion counts in LinkedIn Campaign Manager (allow time for processing).
- SSR safe. When
window(orwindow.lintrk) is absent, the plugin does nothing. page_viewis intentionally never sent. The Insight Tag records page views on its own.- Events without a matching entry in
conversionIdsare dropped. Set the plugin’sdebug: trueto get aconsole.warnfor each dropped event while wiring things up.