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:
- A LinkedIn Campaign Manager account
- A LinkedIn Insight Tag installed on your website (optional but recommended)
- Access to the Conversions API (available for most ad accounts)
Setup Instructions
Step 1: Get Your Conversion Rule ID
- Log in to LinkedIn Campaign Manager
- Navigate to Analyze → Conversions
- Click Create conversion
- Select Conversions API as the conversion source
- Name your conversion (e.g., “Purchase”, “Lead”, “Signup”)
- Choose the conversion type that matches your event
- Save and note the Conversion Rule ID (looks like a number, e.g.,
12345678)
Step 2: Get Your Access Token
- Go to Account Assets → Developer Portal
- Create a new app or use an existing one
- Generate an access token with the
r_adsandw_conversionspermissions - 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
- Go to your Gateway → Integrations tab
- Find LinkedIn and click Connect
- Enter:
- Conversion Rule ID: The ID from Step 1
- Access Token: The token from Step 2
- Toggle Enable Integration on
- Click Save Configuration
Event Mapping
Anacoic automatically maps your events to LinkedIn conversion events:
| Anacoic Event | LinkedIn Conversion |
|---|---|
Pageview | PAGE_VIEW |
Purchase | PURCHASE |
Lead | LEAD |
Sign Up | SIGN_UP |
Add to Cart | ADD_TO_CART |
Initiate Checkout | START_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_idfrom 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: 'customer@example.com', // 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:
- Click one of your LinkedIn ads
- Check the URL contains
?li_fat_id=... - Complete a conversion action
- Check the Live Logs in Anacoic to see the event sent to LinkedIn
Testing Your Integration
Method 1: Live Logs
- Go to your Gateway → Live Logs tab
- Trigger a test event
- Look for “LinkedIn” in the destinations with status 200
Method 2: LinkedIn Campaign Manager
- Go to Analyze → Conversions
- Click on your conversion
- Check the Event Verification section
- 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
- Set up auto-enrichment to capture more user data
- Configure custom events for specific conversion actions
- View troubleshooting guide
Support
Need help? Contact us at support@anacoic.com