End-to-end guide for Google Tag Manager integration for LinkedIn advertisers
Updated Jul 23, 2026
With LinkedIn's Conversions API (CAPI), advertisers can send conversion data directly from their server, instead of relying solely on browser-based tracking. This helps LinkedIn receive more reliable conversion signals for campaign measurement, attribution, and optimization, while reducing the impact of browser restrictions and ad blockers.
To simplify the setup, LinkedIn supports a guided Google Tag Manager (GTM) server-side integration powered by Stape. Advertisers can create and connect a server-side GTM container directly from LinkedIn Campaign Manager through an embedded setup flow.
In this guide, we will walk you through the setup process in LinkedIn Campaign Manager, as well as recommended configurations for Stape sGTM container.
Before you begin
If you haven’t already:
- Configure a trigger in the web container that fires the Google Analytics 4 (GA4) event that you want to track as a conversion.
Setup in LinkedIn Campaign Manager
1. Log in to your LinkedIn Campaign Manager. Click Measure → Conversion Tracking and begin creating your conversion in Campaign Manager. Choose Conversions API as your conversion data source and create your conversion rule.

2. On the Sources page, select Google Tag Manager.

3. (Optional) If you haven’t set up Google Tag Manager, follow the instructions in the dialog to connect your account:
- Click Continue to connect to Google Tag Manager.

- Log in to your Google Tag Manager account and authorize the connection.
4. Set up the data from Google Tag Manager to send to Campaign Manager.
- In the Google Tag Manager account section, click the Select the account dropdown menu and select your account name.

- In the Containers section, click the dropdown menus to select:
- Your existing web container.
- A workspace for the web container.

- In the Server-side tracking section, select the option Automatic setup with Stape. Click the Set up now button and follow the on-screen instructions to connect your account.

- In the Token section, paste your LinkedIn API access token. If you don’t have a token, you can generate one by clicking the Generate token button. Then click Next step.
5. Review and update the ad sets selected for your conversion.
After you set up your conversion, LinkedIn automatically selects ad sets to associate with your conversion (or offers to create an ad set if you don’t have one yet). You can review, add, or remove ad sets as needed. Learn how to review and update the ad sets selected for your conversion.

6. Confirm that your conversion data is being sent and your conversion is active, and publish the containers.
Before publishing your changes, use GTM Preview mode to verify that your setup is working correctly. Trigger the conversion event on your website and confirm that the appropriate tags fire as expected.
After publishing, it may take a few hours before conversions appear in LinkedIn Campaign Manager. You can then view the conversion status in Campaign Manager to verify that your setup is active and receiving conversion data. Learn how to check your conversion status.

Recommended setup in the Stape container
Once you complete the Conversions API setup in LinkedIn Campaign Manager, your server container is created and connected through the embedded Stape flow. You can follow LinkedIn’s setup guide to confirm that everything works correctly. If you’d like to further improve your conversion data quality and make use of the features included with your LinkedIn-sponsored container offer, consider these recommended configurations in your Stape container.
Step 1. Add a custom domain
When creating your Stape container, we have already provided you with a randomized technical domain (for example, wjzsdfvom.us.stape.io). You could use it as a tagging server URL, but it’s recommended to use a custom domain.
When your tagging server is situated on the same domain as your business website (e.g., if your website is example.com, then your tagging server URL could be sst.example.com). In that case, your cookies will be considered first-party, which bypasses ITP limitations of browsers like Safari and significantly increases the cookie lifetime.
With a LinkedIn-sponsored Stape account, you can configure a custom domain automatically or manually. You can enter a domain name, either use the No CDN or Own CDN option (Stape Global CDN is unavailable to LinkedIn-sponsored accounts), as well as configure advanced settings.
More info
1. Log in to your stape.io account → choose a container → scroll down and click Add custom domain.

2. There are two ways of adding a custom domain:

- Automatically (via Entri) - the easiest way to connect domains. Log in with your DNS provider details via Entri, and give us one-time permission to connect your domain. Check the full list of supported DNS providers by Entri.
- Manually - After you add a custom domain to your Stape container, you will see DNS records that should be added to your DNS provider to verify the custom domain. The DNS records depend on the server location and which CDN options you choose.
Here are all available configurations for your custom domain (don’t worry, we’ll cover the configuration process in later sections):
- Domain name - enter your tagging server domain (example: gtm.my-domain.com).
- Add CDN - in LinkedIn-sponsored sGTM containers, you can use either the Own CDN option or leave the switch deactivated for No CDN.
- Advanced settings - here you can tick the box to Use A records instead of CNAME records. If DNS providers restrict adding duplicate records, you should use CNAME record. If not, then choose A records. Please note that this setting is incompatible with the Add Global CDN setting.

Read more in our manual on how to set up a custom domain.
Step 2. Set up Custom Loader
It’s highly recommended to enable Custom Loader as part of your server-side tracking configuration. This power-up minimizes the impact of ad blockers on your GTM and GA4 scripts. It routes requests through a path that turns all cookies first-party, increasing their lifetime.
More info
1. Log in to your Stape account and select your sGTM container from the dashboard.

2. Go to Power-ups and click Use next to the Custom Loader panel.

3. Toggle the Custom Loader switch to enable it and click Save changes.

4. In the Code & Setup information section, configure the following settings:
- Domain - select one of the domains linked to your container.
- Web GTM ID - enter your web Google Tag Manager ID.
- Enhanced ad blocker protection - when enabled, all requests to your sGTM server are encrypted so ad blockers can’t block them based on request patterns. Learn more about the enhanced ad blocker protection.
- Same Origin Path - if you use the same-origin approach, enter the path here so both GTM and gtag.js load through it.
- Platform - here you can either:
- Select your CMS platform (such as Shopify, Wordpress, etc.). In this case, you’ll be required to install and configure a Stape app.
- Select Other to receive a JS snippet in case you’re using another platform or a custom website.
Setup for a listed platform
Select your platform and click Generate. You’ll get configuration and app installation instructions in the Configuration panel for your selected platform. Follow the app installation guide.

Note: Some platforms may require you to tick the Custom Loader checkbox for the power-up to be enabled.
Setup for other platforms
1. Select Other. You can also configure Advanced settings:
- Data Layer variable name - specify only if you use a non-standard
dataLayer. - Generate with Cookie Keeper - includes Cookie Keeper logic in the generated code. This checkbox appears and is automatically enabled when you have the Cookie Keeper power-up.
- User identifier type - appears together with Generate with Cookie Keeper. Choose how to identify users - cookie is the recommended option. When selected, enter the name of the first-party cookie to use as the identifier. For more information read How to choose user identifier type in Cookie Keeper.
2. Click Generate and add the provided code to your website.
Note: Remove the standard GTM loader from your site if you have one - running both simultaneously will cause conflicts.

Testing
To verify the setup is working:
- Open any page on your website.
- Right-click → Inspect → open the Network tab.
- Filter requests by your custom subdomain or same-origin path.
- Look for the GTM request URL - it should return a 200 OK status code.

| Note: With Custom Loader and enhanced ad blocker protection enabled, GA4 request URLs will appear encrypted. |
What you need to know about the LinkedIn-sponsored accounts
- It can be created only via LinkedIn Campaign Manager.
- It is sponsored by LinkedIn, meaning that it is free for eligible advertisers. You cannot upgrade or change your plan manually - it scales automatically based on your container usage.
- You can have 1 Stape server container per LinkedIn ad account (and, by extension, per Stape account).
- You can add up to 3 custom domains per container.
- Your Stape container has usage limitations:
- It is automatically disabled if it has fewer than 2,000 incoming requests/month.
- It can have up to ~190M incoming requests/month.
- The following Stape features are not available for this type of account:
- Stape Store.
- Stape CDN.
- File Proxy power-up.
- Enricher power-up.
- You cannot transfer this container or attach it to Partner/Agency accounts.
Learn more in the detailed overview of GTM integration for LinkedIn advertisers.
Was this article helpful?

Comments