LinkedIn Conversion API Tag for server GTM

Published
Oct 11, 2023

Following other marketing platforms, LinkedIn also began to support server-side conversion tracking. They also published an official LinkedIn CAPI tag in the Google Tag Manager gallery.

Unfortunately, for now, LinkedIn CAPI is a closed API available to qualified developers who meet additional criteria for access. LinkedIn is currently not accepting new applications. For more detailed information, please refer to the official documentation.

Benefits of the LinkedIn Conversion API:Copy link to this section

  • Achieve more accurate conversion attribution.
  • Enhance data reliability.
  • Optimize ad delivery.
  • Decrease cost per action.
  • Strengthen your ads performance.

Linkedin CAPI DeduplicationCopy link to this section

LinkedIn suggests advertisers use both the Insight Tag (web tracking) and the Conversions API (server-side tracking) to understand better how customers behave. But using both can lead to the same event being counted twice. In this case, deduplication is required. 

First, you must create a conversion rule for each implementation method (Insight Tag and the Conversions API). To report identical events sent from the browser and server, you need to have the same event_id. The logic is highly similar to Facebook event Deduplication. 

When Linkedin receives the same Insight Tag event and a Conversions API event from the same account with the same eventId, they discard the Conversions API event and keeps only the Insight Tag event for the reporting.

How to set up LinkedIn CAPICopy link to this section

The tag itself looks simple and requires only four fields for input, two of which are optional.

linkeding capi tag template
  1. Linkedin API Access Token - see here and here for more on generating an access token.
  2. Conversion Rule ID - The conversion rule ID can be found by navigating to the conversion rule within LinkedIn Campaign Manager and opening the settings page. On this screen, select Use a Tag Manager, scroll down, and see the Conversion ID for Google Tag Manager. 
  3. Event ID - the unique ID to indicate each event. It is necessary if you send web and server events. Like Facebook, eventID indicates that the same events are sent from the web and server.
  4. Conversion value - should contain currency code in ISO standard and the amount value in a decimal string. It is optional, but it is necessary if you want your ROAS and other similar parameters in LinkedIn ADS to work correctly.

Setting up the tag looks simple at first glance. The tricky part is that it will only work accurately if you specify the required fields in the tag. There is a list of criteria for user identification, and at least one of them should be passed with the event:

  • A valid userId with idType SHA256_EMAIL 
  • A valid userId with idType LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID 
  • A valid userId with idType ACXIOM_ID 
  • A valid userId with idType ORACLE_MOAT_ID 
  • A valid userInfo combination that requires firstName and lastName

As you can see, you don't specify this data anywhere in the tag; the tag expects you to pass it in the sGTM event data.

This is the first version of Linkedind CAPI, and it will be updated in the future since the solution isn't ideal. Hopefully, LinkedIn will add an option to input data for specific parameters within the tag manually.

The Linkedin CAPI tag automatically maps the following parameters from sGTM event data:

1. ACXIOM_ID

User identifier for matching with LiveRamp identity graph.

The tag looks for it in the event data by the key ‘user_data.acxiomID’

2. ORACLE_MOAT_ID

User identifier for matching with Oracle MOAT Identity.

The tag looks for it in the event data by the key ‘user_data.moatID’

3. Currency

The tag looks for it in the event data by the ‘currency’ key.

4. LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID

First-party cookie ID. Advertisers need to enable enhanced conversion tracking from Campaign Manager to activate first-party cookies that append a click ID parameter li_fat_id to the click URLs.

Strangely, the tag doesn't use cookies from the headers as most tags do.

5. User data

Tag expects a user_data object in sGTM event data to contain:

  • sha256_email_address
  • address.first_name
  • address.last_name
  • jobTitle
  • companyName
  • address.country
  • linkedinFirstPartyId
  • moatID
  • acxiomID
!

Note!

The structure of the variable User Provided Data is taken as a basis, but custom fields are added to it. So you can't just use it like that, you will need to use transformation to add all additional data like jobTitle or companyName if you e.g. use UPD also for Google ADS.

Also, unlike all other tags, this one does not hash data if provided to the tag in its pure form.

According to the documentation, only email should be hashed, all other data is sent in a raw form.

Ideally, the Linkedin CAPI tag from you expects the following obj to collect all user data:

Linkedin CAPI tag from you expects the following obj to collect all user data

ConclusionCopy link to this section

It’s great that more and more platforms are starting to support s2s tracking or hybrid tracking with deduplication, and Linkedin is among them.

However, the tag still looks raw (which is not strange for a beta) and raises a lot of questions, especially about passing user data to the tag and the need to send click ID manually (by the way, the tag also doesn't save the click id to a cookie yet - this also needs to be done manually). For now, customizing the LinkedIn server GTM tag requires deep knowledge of GTM and sGTM, a desire to understand other people's code, and the possibility of getting access to the LinkedIn CAPI beta. 

We will update this manual as soon as the public final version is available.

Any problems with the setup?

We've got you covered! Click on Get help and we will send you a free quote.

Get help
Tagged with:sGTM tag

Host your GTM server at Stape