IntegrationsAdvertisingLinkedIn Ads Conversions

LinkedIn Conversions API

Datafly Signal delivers conversion events to LinkedIn server-to-server using the LinkedIn Marketing API Conversions endpoint. This enables accurate B2B conversion tracking for LinkedIn ad campaigns without depending on the LinkedIn Insight Tag client-side script.

Prerequisites

Before configuring LinkedIn Conversions API in Signal, you need a LinkedIn Campaign Manager account, a conversion rule, and an OAuth access token. Follow the steps below to set everything up.

Step 1: Create a LinkedIn Campaign Manager Account

If you don’t already have one:

  1. Go to business.linkedin.com and sign in with your LinkedIn account.
  2. Click Create a free account in Campaign Manager.
  3. Enter your account name, currency, and associate it with a LinkedIn Page.
  4. Complete the setup wizard. Note your Ad Account ID (numeric) from the account settings page.

Step 2: Create a Conversion Rule

Conversion rules define the actions you want to track (e.g. purchases, leads, sign-ups). Each rule gets a unique ID that you will map to Datafly events.

  1. In Campaign Manager, go to Analyze > Conversion Tracking.
  2. Click Create Conversion.
  3. Choose a conversion type (e.g. Lead, Purchase, Sign-up, Key Page View).
  4. Select Online Conversion and choose Conversions API as the tracking method.
  5. Configure the attribution window (default: 30-day click-through, 7-day view-through).
  6. Click Create. Note the conversion rule URN (e.g. urn:lla:llaPartnerConversion:987654).
  7. Repeat for each conversion action you want to track.

Each conversion action (purchase, lead, sign-up) requires its own conversion rule. You will map each Datafly event to a specific conversion rule ID in the integration configuration.

Step 3: Register an Application in LinkedIn Developer Portal

An application is required to obtain OAuth credentials for API access.

  1. Go to developer.linkedin.com and sign in.
  2. Click Create App.
  3. Fill in the application name (e.g. “Datafly Signal”), select your LinkedIn Page, and upload a logo.
  4. Accept the terms and click Create App.
  5. On the app’s Auth tab, note the Client ID and Client Secret.
  6. Under OAuth 2.0 settings, add your redirect URL (used during the OAuth flow).
  7. On the Products tab, request access to Marketing API (if not already available).
⚠️

Marketing API access may require approval from LinkedIn. This can take 1-3 business days. Apply early to avoid delays.

Step 4: Generate an Access Token

Generate an OAuth 2.0 access token with the required scopes for the Conversions API.

  1. Initiate an OAuth 2.0 authorization flow with the following scopes:
    • r_ads — read access to ad accounts
    • rw_conversions — read/write access to conversion events
  2. Direct the user to:
    https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&scope=r_ads%20rw_conversions
  3. Exchange the authorization code for an access token:
    curl -X POST https://www.linkedin.com/oauth/v2/accessToken \
      -d "grant_type=authorization_code&code=AUTH_CODE&redirect_uri=YOUR_REDIRECT_URI&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET"
  4. Note the access_token and refresh_token from the response.
⚠️

LinkedIn access tokens expire after 60 days. Store the refresh token to enable automatic token renewal. If you do not provide a refresh token, you must manually update the access token before it expires.

Configure in Signal

Now that you have your Ad Account ID, conversion rule URNs, and access token, configure the integration in Signal.

Configuration Fields

FieldRequiredDescription
account_idYesYour LinkedIn Ad Account ID (numeric). Found in LinkedIn Campaign Manager under Account Settings.
access_tokenYesOAuth 2.0 access token with r_ads and rw_conversions scopes.
conversion_rule_idYesMap of Datafly event names to LinkedIn conversion rule URNs. Each conversion action requires a separate rule ID.
refresh_tokenNoOAuth refresh token for automatic token renewal. Strongly recommended for production.
oauth_client_idNoYour LinkedIn app Client ID. Required if using refresh token.
oauth_client_secretNoYour LinkedIn app Client Secret. Required if using refresh token.

Management UI Setup

  1. Go to Integrations > Add Integration > LinkedIn Conversions API.
  2. Enter your account_id.
  3. Complete the OAuth flow by clicking Connect LinkedIn Account or manually enter the access_token.
  4. Map your conversion events to LinkedIn conversion rule IDs (e.g. Order Completed -> urn:lla:llaPartnerConversion:987654).
  5. Select consent categories (typically advertising).
  6. Click Save.

Management API Setup

curl -X POST http://localhost:8084/v1/admin/integrations \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "source_id": "src_abc123",
    "vendor": "linkedin",
    "name": "LinkedIn Conversions",
    "enabled": true,
    "config": {
      "account_id": "123456789",
      "access_token": "your_oauth_access_token",
      "refresh_token": "your_refresh_token",
      "oauth_client_id": "your_client_id",
      "oauth_client_secret": "your_client_secret",
      "conversion_rule_id": {
        "Order Completed": "urn:lla:llaPartnerConversion:987654",
        "Lead Generated": "urn:lla:llaPartnerConversion:987655",
        "Signed Up": "urn:lla:llaPartnerConversion:987656"
      }
    },
    "consent_categories": ["advertising"]
  }'

API Endpoint

POST https://api.linkedin.com/rest/conversionEvents

Authentication is via OAuth 2.0 Bearer token. Events are sent as JSON with the LinkedIn Versioned API headers.

Identity Signals

LinkedIn Click ID (li_fat_id)

The primary identity signal for LinkedIn conversions is the li_fat_id (LinkedIn First-Party Ad Tracking ID). When a user clicks a LinkedIn ad, this parameter is appended to the landing page URL:

https://example.com/landing?li_fat_id=abc123-def456-ghi789

Datafly.js automatically captures the li_fat_id from the URL and persists it as a first-party cookie for the duration of the attribution window. It is included in all subsequent events sent to LinkedIn.

SignalFieldDescription
li_fat_iduser.userIds[].idType: LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUIDLinkedIn first-party ad tracking cookie. Captured automatically from the URL parameter.
ip_addressForwarded from original requestVisitor’s IP address.
user_agentForwarded from original requestVisitor’s User-Agent string.
⚠️

LinkedIn conversion attribution relies heavily on li_fat_id. If this parameter is not captured, LinkedIn may not be able to attribute the conversion to an ad click. Ensure your LinkedIn ad campaigns include first-party tracking.

User-Provided Signals (Hashed)

When user data is available via _df.identify(), the following fields are SHA-256 hashed before sending to LinkedIn:

SignalHashingDescription
emailSHA-256, lowercase, trimmedUser’s email address
firstNameSent as-is in userInfoUser’s first name
lastNameSent as-is in userInfoUser’s last name
companyNameSent as-is in userInfoUser’s company name

All PII hashing is performed server-side by the Delivery Worker. Raw PII never leaves your infrastructure. Hashed email is sent as a supplementary signal and can improve match rates for users who are logged into LinkedIn.

Event Mapping

LinkedIn uses conversion rules rather than standard event names. Each conversion rule is created in LinkedIn Campaign Manager and assigned a unique URN. You map Datafly event names to conversion rule IDs in the integration configuration.

Datafly EventLinkedIn ConversionNotes
Order Completed / Product PurchasedMapped via conversion_rule_idTypically a “Purchase” conversion rule. Includes conversionValue.
Lead GeneratedMapped via conversion_rule_idTypically a “Lead” conversion rule
Signed UpMapped via conversion_rule_idTypically a “Sign-up” conversion rule
page (page view)Mapped via conversion_rule_idTypically a “Key Page View” conversion rule
Custom eventsMapped via conversion_rule_idAny Datafly event can be mapped to any conversion rule

Events not mapped to a conversion rule ID are silently dropped for this integration.

Example: Lead Conversion Event

Datafly.js call:

_df.track("Lead Generated", {
  lead_source: "contact_form",
  value: 500.00,
  currency: "USD"
});

LinkedIn Conversions API payload sent by Signal:

{
  "conversion": "urn:lla:llaPartnerConversion:987655",
  "conversionHappenedAt": 1706540000000,
  "conversionValue": {
    "currencyCode": "USD",
    "amount": "500.00"
  },
  "user": {
    "userIds": [
      {
        "idType": "SHA256_EMAIL",
        "idValue": "836f82db99121b3481011f16b49dfa5fbc714a0d1b1b9f784a1ebbbf5b39577f"
      },
      {
        "idType": "LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID",
        "idValue": "abc123-def456-ghi789"
      }
    ],
    "userInfo": {
      "firstName": "John",
      "lastName": "Doe",
      "companyName": "Acme Inc"
    }
  },
  "eventId": "evt_abc123def456"
}

Testing Your Integration

Step 1: Verify Conversion Rules

  1. In LinkedIn Campaign Manager, go to Analyze > Conversion Tracking.
  2. Confirm each conversion rule is set to Conversions API tracking method.
  3. Note the URN for each rule and verify it matches your Signal configuration.

Step 2: Send Test Events

  1. Trigger events on your website with the Signal integration enabled.
  2. Check the Signal event debugger to confirm events are being delivered.
  3. Verify the delivery status shows 200 OK responses from LinkedIn.

Step 3: Verify in Campaign Manager

  1. In Campaign Manager, go to Analyze > Conversion Tracking.
  2. Click on each conversion rule. Under Recent Activity, you should see conversion events arriving.
  3. Allow up to 15 minutes for conversions to appear in reporting.

LinkedIn may take up to 15 minutes to reflect conversion events in the Campaign Manager dashboard. If events are not appearing after 30 minutes, check the troubleshooting section below.

Troubleshooting

ProblemSolution
Events not appearing in Campaign ManagerVerify the account_id and conversion rule URNs are correct. Check the access token has r_ads and rw_conversions scopes.
401 Unauthorized errorsThe access token has expired (60-day lifetime) or been revoked. Generate a new token or configure a refresh token.
403 Forbidden errorsThe app does not have Marketing API access, or the system user lacks permissions on the ad account.
Low attribution / no conversions matchedEnsure li_fat_id is being captured. Check that LinkedIn ad campaigns have first-party tracking enabled. Add hashed email via _df.identify() for supplementary matching.
429 Too Many RequestsReduce rate_limit_rps or contact LinkedIn to request a higher rate limit for your application.
Conversion values not appearingEnsure value and currency are included in the event properties. LinkedIn requires both fields for revenue tracking.

Rate Limits

SettingDefault
rate_limit_rps30
rate_limit_burst60

LinkedIn’s Marketing API has relatively strict rate limits compared to other advertising platforms. The defaults are set conservatively to avoid 429 responses.

LinkedIn applies rate limits at the application level, not per ad account. If you have multiple LinkedIn integrations across different ad accounts, they share the same rate limit pool.

For full API documentation, see LinkedIn Conversions API documentation.