Stape

LinkedIn Conversion API Tag for server GTM

Updated
Apr 22, 2024
Published
Oct 11, 2023

Following other marketing platforms, LinkedIn also began to support server-side conversion tracking. 

We’ve developed our own LinkedIn Conversion API tag for sGTM, which makes the setup way much simpler and intuitive than using the native one.

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.

How to set up LinkedIn Conversion APICopy link to this section

So firstly download the LinkedIn CAPI tag for the sGTM from Stape’s GitHub repository or have it added from the sGTM tag gallery.

The tag itself is very easy to use, we’ve added the ability to enter explicit variables that will be reported to LinkedIn in a proper format. Tag configuration consists of the two parts - PageView and Conversion events.

  1. PageView method has been added to a tag to make your LinkedIn tracking resistant to various adblockers. If you are using Stape’s custom loader with a patched gtag and/or Data Tag/Data Client to send data from web to server container - the PageView method fired on a page_view event will store LinkedIn click ID URL parameter into a li_fat_id cookie, even if the LinkedIn browser pixel has been blocked.
  2. Conversion method is intended to report conversion events to LinkedIn CAPI.

To send an event via LinkedIn CAPI you require an access token, a conversion rule ID and one of the 4 first party parameters LinkedIn requires you to send (hashed email, LinkedIn click ID value, Acxiom ID or Moat ID).

As already mentioned the process for obtaining CAPI access token has been greatly simplified - all you need to do now is the following:

  • In your Campaign Manager, go to Analyze menu section -> Conversion tracking -> Data sources tab -> Create source -> choose Conversion API -> select Google Tag Manager.  Then click ‘Generate token’, pass the authentication and the provided key will be your way to send events to the Conversion API.
LinkedIn Conversion API Tag for server GTM

Event deduplicationCopy link to this section

LinkedIn web + CAPI event reporting is designed in a way commonly called “redundant event setup”. This means that you may report an event from the LinkedIn Insight tag and additionally via the LinkedIn CAPI tag. In order to avoid overreporting, you should send an identical event ID with the web and server event. The web event has a higher priority and will be counted as a conversion, and if the same conversion with the same event ID will be delivered via CAPI - such event will be discarded. Please be sure to handle this process properly for accurate conversion tracking.

How to send events via LinkedIn Insight tag and sGTMCopy link to this section

1. Please make sure to use the latest version of the official LinkedIn Insight tag, that supports reporting of the event ID.

2. When you send a conversion through multiple methods, you need to create a conversion rule for each data source (browser and server). For the browser source - conversion rule ID will be available to you during the conversion creation process in the user interface.

LinkedIn Conversion API Tag for server GTM

3. To create a conversion that will be reported from the sGTM please also click Create conversion -> Conversion API -> Google Tag Manager. Once you are done, select the newly created conversion and Conversion Rule ID will be available to you in the URL, right after conversions/.

LinkedIn Conversion API Tag for server GTM

4. That’s pretty much it, make sure to add identical event_id sent from the web and any user data that is available for better event matching. li_fat_id cookie value will be automatically added to the payload if received in the incoming request cookie header.

5. To verify your setup, you may trigger your conversion event. The status for your conversions should change to “Active”. If your deduplication is properly set up, after a while you’ll see a message confirming it if you click on a status for the CAPI conversion.

LinkedIn Conversion API Tag for server GTM

ConclusionCopy link to this section

With the recent updates introduced by LinkedIn and Stape’s server GTM tag, setting up the LinkedIn Conversion API became a much easier process. Adding conversion API will strengthen your existing web pixel tracking, providing additional resistance to adblockers and latest ITP changes, especially in conjunction with other Stape power-ups like Custom Loader, Cookie Keeper or own CDN.  And of course with LinkedIn CAPI you are also able to report offline conversion events, which may significantly help in measuring performance of your LinkedIn campaigns.

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