Zernio
APIFor you
Zernio
APIFor you
Platforms

LinkedIn Ads

Overview

Build

Create adsBoost a postLead Gen FormsCreative formats

Target

TargetingMatched AudiencesBid pricing & forecasts

Measure

AnalyticsConversions APIInsight TagURL tracking tags

Operate

Manage adsAd Library

Reference

Media & limits
Dashboard
OverviewPlatformsAPI ReferenceResources
LinkedIn Ads

URL tracking tags

Read and set a LinkedIn campaign's Dynamic UTM parameters through GET and PATCH /v1/ads/{adId}/tracking-tags.


By the end of this page, a LinkedIn campaign appends UTM parameters to every creative's landing-page URL.

Read the parameters

LinkedIn's Dynamic UTM Tracking lives at the campaign level. You operate on it through the ad endpoints by passing any ad in the campaign.

There are two kinds of parameter:

  • dynamicValueParameters map a key to a LinkedIn token resolved at serve time: CAMPAIGN_ID, CAMPAIGN_NAME, CAMPAIGN_GROUP_ID, CAMPAIGN_GROUP_NAME, CREATIVE_ID, ACCOUNT_ID, ACCOUNT_NAME.
  • customValueParameters map a key to a static string.

These are click-URL parameters, not the site tag.

The LinkedIn Insight Tag you install on a website, with its conversion rules, is on Insight Tag.

Call GET /v1/ads/{adId}/tracking-tags with the Zernio _id of an ad in the campaign.

import Zernio from '@zernio/node';

const zernio = new Zernio();

const { data: tags } = await zernio.trackingtags.getAdTrackingTags({
  path: { adId: '66f0a1b2c3d4e5f6a7b8c9d0' }
});

console.log(tags.dynamicValueParameters);

Response (200):

{
  "platform": "linkedinads",
  "level": "campaign",
  "dynamicValueParameters": { "utm_campaign": "CAMPAIGN_NAME" },
  "customValueParameters": { "utm_source": "linkedin" }
}

Set or update them

Call PATCH /v1/ads/{adId}/tracking-tags with dynamicValueParameters, customValueParameters or both.

const { data: updated } = await zernio.trackingtags.updateAdTrackingTags({
  path: { adId: '66f0a1b2c3d4e5f6a7b8c9d0' },
  body: {
    dynamicValueParameters: { utm_campaign: 'CAMPAIGN_NAME', utm_content: 'CREATIVE_ID' },
    customValueParameters: { utm_source: 'linkedin', utm_medium: 'paid_social' }
  }
});

console.log(updated.customValueParameters);

Response (200):

{
  "platform": "linkedinads",
  "level": "campaign",
  "dynamicValueParameters": { "utm_campaign": "CAMPAIGN_NAME", "utm_content": "CREATIVE_ID" },
  "customValueParameters": { "utm_source": "linkedin", "utm_medium": "paid_social" }
}

Parameters set on a campaign apply to all its creatives, existing and new, without re-review.

Conversation, Message and Lead Gen Form ads do not support dynamic UTM parameters.

Static UTMs baked into a creative's own landing-page URL should not reuse the same keys, or they collide.

If it fails

ErrorCauseFix
404 ad_not_foundadId matched no ad of yoursTake the _id from the create response or from GET /v1/ads
403 ads_allowance_exceeded on the PATCHThe team has no payment method on file and has reached its 500 free live adsAdd a card to resume
405The ad's platform has no click-URL tracking surface (TikTok, X, Pinterest). A LinkedIn ad never returns it.Use a LinkedIn, Meta or Google ad

The 404 body:

{
  "error": "Ad not found",
  "type": "not_found",
  "code": "ad_not_found",
  "param": "adId"
}

Related

  • Create ads: where the ad _id comes from.
  • Insight Tag: the site tag and its conversion rules, which is a different thing.
  • Meta Ads tracking tags and Google Ads tracking tags: the same endpoint on the other networks.
  • Get ad tracking tags and Set ad tracking tags: every field.
Was this page helpful?

Insight Tag

Read, create and share a LinkedIn Insight Tag, manage its conversion rules, check when it last fired, and install it on Shopify or WordPress.

Manage ads

Pause and resume LinkedIn campaign groups, campaigns and creatives, change a campaign's budget, swap a creative's media, rename, duplicate and delete.

On this page

Read the parametersSet or update themIf it failsRelated