LinkedIn CAPI Integration

Send server-side conversions to LinkedIn Campaign Manager

LinkedIn Conversions API Integration

Connect your Anacoic gateway to LinkedIn Campaign Manager to send server-side conversion events for better attribution and campaign optimization.

Prerequisites

Before you begin, you’ll need:

  1. A LinkedIn Campaign Manager account
  2. A LinkedIn Insight Tag installed on your website (optional but recommended)
  3. Access to the Conversions API (available for most ad accounts)

Setup Instructions

Step 1: Get Your Conversion Rule ID

  1. Log in to LinkedIn Campaign Manager
  2. Navigate to AnalyzeConversions
  3. Click Create conversion
  4. Select Conversions API as the conversion source
  5. Name your conversion (e.g., “Purchase”, “Lead”, “Signup”)
  6. Choose the conversion type that matches your event
  7. Save and note the Conversion Rule ID (looks like a number, e.g., 12345678)

Step 2: Get Your Access Token

  1. Go to Account AssetsDeveloper Portal
  2. Create a new app or use an existing one
  3. Generate an access token with the r_ads and w_conversions permissions
  4. Copy the token (it starts with AQ...)

Note: LinkedIn tokens expire after 60 days. Set a reminder to refresh your token.

Step 3: Configure in Anacoic

  1. Go to your GatewayIntegrations tab
  2. Find LinkedIn and click Connect
  3. Enter:
    • Conversion Rule ID: The ID from Step 1
    • Access Token: The token from Step 2
  4. Toggle Enable Integration on
  5. Click Save Configuration

Event Mapping

Anacoic automatically maps your events to LinkedIn conversion events:

Anacoic EventLinkedIn Conversion
PageviewPAGE_VIEW
PurchasePURCHASE
LeadLEAD
Sign UpSIGN_UP
Add to CartADD_TO_CART
Initiate CheckoutSTART_CHECKOUT

User Data Requirements

LinkedIn requires specific user data for effective matching:

Required (at least one):

  • Email (SHA256 hashed automatically)
  • LinkedIn Click ID (li_fat_id from URL)

Optional (improves match rate):

  • First name
  • Last name
  • Company name
  • Country code

Example Event with User Data:

anacoic.track('Purchase', {
  value: 99.99,
  currency: 'USD',
  order_id: 'ORDER-123',
  user: {
    email: '[email protected]',  // Will be hashed automatically
    firstName: 'John',
    lastName: 'Doe',
    company: 'Acme Inc',
    country: 'US'
  }
});

Click ID Tracking

LinkedIn passes a click ID (li_fat_id) in the URL when users click your ads. Anacoic automatically extracts this and sends it with your conversion events.

To verify it’s working:

  1. Click one of your LinkedIn ads
  2. Check the URL contains ?li_fat_id=...
  3. Complete a conversion action
  4. Check the Live Logs in Anacoic to see the event sent to LinkedIn

Testing Your Integration

Method 1: Live Logs

  1. Go to your Gateway → Live Logs tab
  2. Trigger a test event
  3. Look for “LinkedIn” in the destinations with status 200

Method 2: LinkedIn Campaign Manager

  1. Go to AnalyzeConversions
  2. Click on your conversion
  3. Check the Event Verification section
  4. Look for events with source “Conversions API”

Troubleshooting

”401 Unauthorized” Error

  • Your access token has expired (tokens last 60 days)
  • Generate a new token and update your configuration

”404 Not Found” Error

  • The Conversion Rule ID doesn’t exist
  • Verify the ID in Campaign Manager → Conversions

Low Match Rates

  • Ensure you’re passing user email addresses
  • Enable Auto-Enrichment to capture logged-in user data
  • Verify the LinkedIn click ID is being captured

Data Retention

LinkedIn stores conversion data for:

  • Attribution window: 30 days (configurable in Campaign Manager)
  • Data retention: Up to 2 years for reporting

Privacy & Compliance

  • All PII is SHA256 hashed before sending to LinkedIn
  • LinkedIn is GDPR compliant
  • You can configure data processing agreements in Campaign Manager

Next Steps

Support

Need help? Contact us at [email protected]