lads_get_insight_tag
LinkedIn Ads read low risk
Part of the Conversion Tracking Agent.
What it does
Retrieve the LinkedIn Insight Tag (partner tracking pixel) for an ad account so web conversions and first-party retargeting can be set up. Reads GET /rest/insightTags?q=account (one tag per account: id, the HTML/JS snippet in tag, sponsoredAccounts, firstPartyTrackingEnabled) and GET /rest/insightTagDomains?q=account (the websites that sent the tag a signal: domainName, lastCallbackAt, blocked), and notes no tag, no domain yet, no callback in 7 days, blocked domains, and first-party cookies off. Read-only; pair with lads_create_conversion_rule for web conversions and with engagement rules for site-visit retargeting. — verify against the LinkedIn-Version 202606 docs before relying on field names.
When to use it
During a full account audit, start with lads_audit_account — it defines the checks, benchmarks, and severity rules this tool's data feeds.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
account | string | yes | Sponsored account; normalize to urn:li:sponsoredAccount:{id}. Within bearer scope. |
Safeguards
Policy
The Insight Tag collects member web activity; the client must disclose tracking and obtain consent (cookie/consent banner). Return tag config only for the bearer's scoped account; do not retain member-level web data.
Reminder
Insight Tag tracks member web activity — the client must have a consent mechanism; do not retain member-level web data.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
PERMISSION_DENIED | No access to the account or missing scope (403). | Verify role/scope; re-auth if needed (needs_reauth). | no |
CUSTOMER_NOT_FOUND | Account not found/associated. | Confirm account id and access. | no |
NOT_FOUND | No Insight Tag configured for the account (404). | Return success with not-installed status and the install snippet/guidance. | no |
TOKEN_REVOKED | Token expired/revoked (401). | Refresh and retry once; else re-auth. | yes |
RESOURCE_EXHAUSTED | Rate limit (429). | Backoff 5/10/20s cap 60s; respect Retry-After. | yes |
PLATFORM_ERROR | LinkedIn 5xx. | Retry with backoff. | yes |
Edge cases
- No tag on the account (LinkedIn answers 200 with no elements) -> success, an empty list and a note to create one in Campaign Manager (Scalix does not create tags). A tag no website has signalled yet -> a note that it is not installed or the site had no visit; the snippet to install is tag.
- No unblocked domain called back in the last 7 days (lastCallbackAt) -> a note that the tag may have been removed or the site has no traffic. Blocked domains are listed: LinkedIn captures no conversions or retargeting from them.
- firstPartyTrackingEnabled false -> a note that Conversions API matching on LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID (li_fat_id) needs first-party cookies on.
- The domains read is display only: if it fails, the tag still comes back, with a note that firing is not verified — verify against the pinned LinkedIn-Version before relying.