> ## Documentation Index
> Fetch the complete documentation index at: https://docs.erdo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# LinkedIn Insight Tag

> Connect the LinkedIn Insight Tag from an organization's own ad account to its published pages, and optionally send a lead conversion after successful capture.

Erdo can install the LinkedIn Insight Tag on published pages for an organization's own connected
LinkedIn Ads account. The tag records page views so LinkedIn can build website audiences. If the
account has an event-specific website conversion selected for lead submissions, Erdo can also send it after a lead form
has been saved successfully.

## Set up the account tag

Use the account that owns the organization's LinkedIn campaigns. Do not use a tag from another
advertiser or an Erdo account. The account, partner, and conversion IDs must be positive decimal
integers that JavaScript can represent exactly.

1. Call `run_integration_action` with `app: linkedin_ads`,
   `action_key: get_linkedin_insight_tag`, and
   `configured_props: {"ad_account_id": "123456789"}`. Use the numeric sponsored account ID
   resolved for this organization.
2. The read returns the tag's `partner_id`. This is the `_linkedin_partner_id` from LinkedIn's
   browser snippet. LinkedIn's API `InsightTag.id` is a separate identifier; use the returned
   `partner_id` to configure page tracking.
3. Call `run_integration_action` again with `app: linkedin_ads`,
   `action_key: set_linkedin_insight_tracking`, and
   `configured_props: {"ad_account_id": "123456789", "partner_id": "987654321"}`. Include
   `conversion_id` in `configured_props` when needed. The setup action checks the tag and conversion
   against that same account before saving.

The `ad_account_id` and `partner_id` are required. `conversion_id` is optional. Omitting it when
updating an existing destination clears its lead-conversion mapping; retain the current ID if you
want to keep measuring that conversion. Provide it when you
want successful lead captures to count against a LinkedIn website conversion owned by that same
account. LinkedIn's [conversion setup guide](https://www.linkedin.com/help/lms/answer/a425606/set-up-online-conversion-tracking)
explains how to create event-specific conversions and verify that the Insight Tag is installed.
The conversion ID is available from the conversion's settings in Campaign Manager; see
[LinkedIn's instructions for finding it](https://www.linkedin.com/help/lms/answer/a1482224).

The tag read needs LinkedIn Ads account access and the `r_ads` permission. If the account has no
Insight Tag yet, create one in that account's Campaign Manager, then run the read again. LinkedIn
describes the [tag creation steps here](https://www.linkedin.com/help/linkedin/answer/a415868). If
the read is denied, resolve account access or permission before configuring page tracking.
When a conversion ID is supplied, Erdo reads it from the account-scoped
[`GET /rest/conversions/{conversion_id}?account={sponsoredAccountUrn}` endpoint](https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/conversion-tracking?view=li-lms-2026-02)
and confirms the response belongs to the same account before saving it.

The tools read and configure the account through its connected LinkedIn integration. The Insight Tag
API supports account-scoped lookup with `GET /rest/insightTags?q=account&account=...`; LinkedIn
documents that an ad account has one Insight Tag in its [Marketing API guide](https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/conversion-tracking?view=li-lms-2026-02).

## What the tag sends

The page shell loads LinkedIn's tag and records the page view. When `conversion_id` is configured, a
successful lead capture sends `lintrk('track', { conversion_id: ... })` after the server confirms
that the lead was saved. Page views continue to support retargeting when no conversion ID is set.
Phone calls, form opens, and failed submissions do not fire this lead conversion.

The tag follows the page's gtag Consent Mode state. If the page sets any of `ad_storage`,
`ad_user_data`, or `ad_personalization` to denied or leaves a required-consent setup without grants,
the tag waits. With `consent: implied` and no explicit consent command, it initializes after the DOM
is ready. A later consent update initializes a tag that was waiting; a later denial blocks further
lead-conversion calls.

LinkedIn advises against installing the Insight Tag on pages that collect or contain sensitive
data. Review its [Insight Tag guidance](https://www.linkedin.com/help/lms/answer/a516590) for the
page types covered by that restriction before connecting the tag.

## Read the configuration

Use `erdo analytics tracking` or the read-only `GET /v1/page-tracking` endpoint to confirm whether
the tag is configured and enabled. A `linkedin_insight` destination returns its numeric `partner_id`
as `public_id`. If a conversion is configured, its ID appears as `conversion_id`; the field is
omitted for retargeting-only setup. See [page tracking](https://docs.erdo.ai/page-tracking.md) for the complete response
shape and CLI output.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.