DE

EN

Blog Post

Web analytics

Halid Osmaev

Halid

Osmaev

published on:

Why LinkedIn CAPI Tracking Doesn't Work

Table of Contents

No table of contents available

LinkedIn CAPI is a new interface designed to send conversions via server-side tracking. It also allows you to share additional user data to track attribution to your LinkedIn campaigns much more accurately.

What is LinkedIn CAPI all about?

You might already be familiar with the term CAPI from the Meta CAPI Tag. The Meta CAPI Tag is a huge help when it comes to significantly improving tracking and, in turn, optimizing Meta campaigns.

Now, an official LinkedIn CAPI Tag has finally been added as a tag template to Google Tag Manager. You can easily find and add it via the Community Template Gallery. While several guides explain how to implement the tag, practical implementation has shown that it doesn't quite work as initially expected.

The Problem

Many guides currently floating around the web don't lead to working tracking. Even after configuring everything as instructed, conversions simply fail to show up in LinkedIn Campaign Manager.

The reason? A few parameters are required behind the scenes, but aren't labeled as such. To implement LinkedIn CAPI tracking properly, just follow this step-by-step guide:

The (Correct) Guide

Prerequisites
To track LinkedIn CAPI conversions, the following prerequisites must be met:

  • You need a working Server-Side Tracking setup 

  • You must have active or existing LinkedIn campaigns set up

1. Generate an API Access Token
The first step is to generate and extract your LinkedIn API access token.

  1. Log in to LinkedIn Campaign Manager.

  2. In the left menu, go to Analyze and click on Conversion Tracking.

  3. Click on Data sources.

  4. In the Create source dropdown, select Conversions API or CSV.

  5. Choose the Google Tag Manager option and follow the prompts.

  6. Save your generated API Token in a secure place.

2. Create a LinkedIn Conversion
Next, you'll need the LinkedIn conversion you want to track—specifically its Conversion Rule ID.

  1. In the Create Conversion dropdown, click on Conversions API or CSV conversion.

  2. Select Google Tag Manager and follow the remaining steps.

  3. Once created, open the conversion again from your conversion overview.

  4. You can find the Conversion Rule ID right in the URL.

3. Configure the Client
Now that you have all the necessary info, you can start configuring your client-side Google Tag Manager.

  1. Create a new 1st Party Cookie Variable that reads the “li_fat_id” cookie.

  2. Open your Google tag and add the parameter: user_data.linkedinFirstPartyId, setting its value to the variable you just created.

  3. Next, add a randomly generated number as the EventID parameter. This helps deduplicate events if you're running both client-side LinkedIn Insight Tags and CAPI Tags.

  4. If you haven't already, create a GA4 event for the conversion you set up.

4. Configure the Server
Finally, it's time to set up your server-side Google Tag Manager.

  1. From the Community Gallery, add the LinkedIn | CAPI Tag Template by linkedin-developers.

  2. Fill in the LinkedIn API Access Token and Conversion Rule ID parameters with the values from Steps 1 and 2.

  3. Under EventID, pass along the event ID sent from the client.

  4. For the Conversion Value parameter, enter {"currencyCode": "EUR", "amount": "0.0"}. You can adjust “EUR” and “0.0” if your conversion has a specific value (like a product purchase). If not, it's best to leave it as is.
    In the end, your tag configuration should look like this:

Notes
The reason tracking failed in many tutorials is that parameters like Conversion Value—marked as optional—were actually mandatory. On top of that, the parameter user_data.linkedinFirstPartyId is essential; without it, attributing conversions to your LinkedIn campaigns isn't possible.

Additional Configuration Options

You can easily expand your LinkedIn CAPI tracking. The following optional parameters can be passed from the client-side Google tag so that the LinkedIn CAPI tag picks them up and sends them along automatically:

  • user_data.sha256_email_address: The user's hashed email address

  • user_data.companyName: The user's company name

  • user_data.jobTitle: The user's job title

  • user_data.address.first_name: The user's first name

  • user_data.address.last_name: The user's last name

Keep in mind that attribution via the last four parameters isn't always guaranteed. For instance, multiple users could easily match the data if only a first name is provided.

Please note: user data should only ever be transmitted if the user has given proper consent!

Our skilled web analytics team is always happy to help set up tracking for you or answer any questions you might have. Our analytics experts are ready to support you every step of the way. Feel free to get in touch!

Halid Osmaev

Halid

Osmaev

Halid Osmaev has been with the internetwarriors in web analytics since August 2021. With extensive knowledge in IT and mathematics, he can assist you with everything from simple to the most complex web analytics topics. Whether it's setting up a basic tracking infrastructure or conducting an in-depth analysis of company processes, he's ready to help.

Comments on the post

no comments yet

Write a comment

Your email address will not be published. Required fields are marked with *

Address

Bülowstraße 66

Aufgang D3

10783 Berlin

Legal Information

Newsletter

Address

Bülowstraße 66

Aufgang D3

10783 Berlin

Legal Information

Newsletter

Address

Bülowstraße 66

Aufgang D3

10783 Berlin

Legal Information

Newsletter