organized-ai/plugin-marketplace/linkedin-capi-setup
Claude Code and agent skill by organized-ai/plugin-marketplace
- community
Checking that the SKILL.md file is still in the repository.
Server-side LinkedIn Conversions API implementation using Stape and Google Tag Manager. Use when setting up LinkedIn CAPI tracking, configuring LinkedIn server-side conversions, implementing LinkedIn conversion tracking, generating LinkedIn access tokens, creating LinkedIn conversion rules, or debugging LinkedIn CAPI events. Triggers on "LinkedIn CAPI", "LinkedIn conversions API", "LinkedIn server-side tracking", "li_fat_id", "LinkedIn conversion rule", "LinkedIn sGTM setup".
Install
npx vskill@latest install organized-ai/plugin-marketplace/linkedin-capi-setupSKILL.md
The same SKILL.md was published earlier as organized-ai/plugin-marketplace/linkedin-capi-setup.
LinkedIn Conversions API Setup
Implement server-side LinkedIn conversion tracking using Stape GTM and the LinkedIn Conversions API tag.
Prerequisites Checklist
Before starting, verify:
- [ ] Stape container configured with custom domain
- [ ] Server GTM container connected to Stape
- [ ] Data flow established (GA4 or Data Tag/Client)
- [ ] LinkedIn Campaign Manager admin access
- [ ] LinkedIn Ad Account ID
Workflow
Step 1: Generate LinkedIn Access Token
- Navigate to Campaign Manager → Data → Signals Manager
- Under Sources, click Google Tag Manager
- Click Generate Token and authenticate
- Copy the token (expires after extended period)
Store token in GTM as Constant Variable: {{LinkedIn - Access Token}}
Step 2: Create Conversion Rules
For Server-Side (CAPI) Conversions:
- Campaign Manager → Analyze → Conversions
- Click Create conversion → Conversions API
- Select Direct API integration on Sources step
- Complete conversion setup
- Get Conversion Rule ID from URL (after
/conversions/)
For Browser-Side Deduplication:
- Create matching conversion rule via Insight Tag
- Note browser Conversion Rule ID for event_id sync
Step 3: Install Stape LinkedIn CAPI Tag
In Server GTM:
- Templates → Tag Templates → Search Gallery
- Search "LinkedIn Conversions API" by Stape
- Add to workspace
Step 4: Configure LinkedIn CAPI Tag
PageView Tag (Required for Cookie Storage):
Trigger: All page_view events
Conversion Tag:
Required user data (at least ONE):
- Hashed email (
sha256_email_address) - LinkedIn Click ID (
li_fat_idcookie) - Acxiom ID
- Moat ID
Optional for better matching:
- First name, last name
- Job title, company
- External ID, country
Step 5: Implement Event Deduplication
Generate unique event_id for each conversion. See scripts/generate_event_id.py.
Pass identical event_id to:
- Client-side LinkedIn Insight Tag
- Server-side LinkedIn CAPI Tag
Deduplication rules:
| Scenario | Deduplicated? | |
|---|---|---|
| Same conversion + same campaign | ✅ Yes (except Purchase/Add to Cart) | |
| Same conversion + different campaigns | ⚠️ Attribution model decides | |
| Different conversions | ❌ Not deduplicated | |
| Repeat Purchase/Add to Cart | ❌ All counted |
Step 6: Test and Validate
- Open GTM Preview Mode (both web and server containers)
- Add
?li_fat_id=test123to URL to simulate ad click - Trigger conversion event
- Check Server GTM Console for:
- ResponseStatusCode:
201= Success - Payload includes currency, value, user data
Verify in Campaign Manager:
- Conversion status changes to Active
- Deduplication message appears for CAPI conversion
User Data Parameters
| Parameter | GTM Variable Name | Format | |
|---|---|---|---|
user_data.sha256_email_address | SHA256 hash | ||
| First Name | user_data.address.first_name | Plain text | |
| Last Name | user_data.address.last_name | Plain text | |
| Phone | user_data.phone_number | E.164 format | |
| LinkedIn Click ID | li_fat_id | From cookie | |
| External ID | external_id | Your system ID |
Common Issues
Events not registering:
- Missing required user identifier (email, li_fat_id, Acxiom, or Moat ID)
- Invalid or expired access token
- Incorrect Conversion Rule ID
Deduplication not working:
- event_id mismatch between client and server
- Different Conversion Rule IDs used
Low match rates:
- Add more user data parameters
- Ensure email is properly SHA256 hashed
Resources
scripts/generate_event_id.py- Event ID generator for deduplicationreferences/linkedin-capi-api.md- Complete API field referencereferences/stape-gtm-config.md- Stape container setupreferences/conversion-categories.md- LinkedIn conversion types
Integration with Stape MCP
Use Stape MCP tools to configure containers:
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinggtm-ai-plugin/skills/linkedin-capi-setup/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/organized-ai/plugin-marketplace/linkedin-capi-setup)