server-side-conversion-tracking
Helps your agent set up server-side conversion tracking. This ensures sales are recorded accurately on platforms like Facebook and Google.
What it does
This tool helps ensure your sales are correctly recorded by advertising platforms (like Facebook, Google, TikTok), even when browsers block tracking. It improves the accuracy of conversion reports.
When to use it
- ✓When ads show fewer sales than you actually had.
- ✓If the cost per sale seems to have increased for no apparent reason.
- ✓When setting up new paid advertising campaigns.
Example of what to ask your AI
“Set up server-side conversion tracking for my campaigns.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
It captures important customer information when they click an ad and sends it directly to the ad platforms. This bypasses browser blocks and ensures sales are attributed correctly.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add github/awesome-copilot --skill server-side-conversion-trackingOr download just the file:
curl -L https://raw.githubusercontent.com/github/awesome-copilot/main/skills/server-side-conversion-tracking/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Server-Side Conversion Tracking
Browser pixels lose a large and unpredictable share of conversions to iOS tracking prevention, ad blockers, cookie lifetime limits and cross-domain hops. Server-side reporting fixes the reporting, which is what the ad platform's bidding model learns from. This skill covers the model, the setup order and how to verify it.
When to use
- Ad platform reports fewer purchases than the store/database actually recorded
- CPA looks like it got worse right after a tracking change, with no change in real sales
- Setting up a new funnel that will receive paid traffic
- Asked about CAPI / Events API / offline conversion import / click id passthrough
- Attribution disagreements between platforms ("Facebook claims 40 sales, Google claims 30, we had 45 orders")
The model, in the order it must be built
Getting this order wrong is the usual reason a "server-side setup" still under-reports.
1. Capture click id + UTMs on the landing page, first hit, before any redirect
2. Persist attach them to the visitor's session, server-side
3. Carry keep them across every funnel step, including cross-domain hops
4. Attach write them onto the order record at purchase
5. Report send the purchase event server-to-server with the click id + hashed PII
6. Dedupe give the browser event and the server event the same event id
7. Verify compare platform-reported conversions against your own order table
Skipping step 1-4 and only doing step 5 produces server events with no click id, which the platforms then have to match on hashed email alone - that is materially worse matching, and it is the most common failure in a "we already do CAPI" setup.
Step 1-2: capture and persist
| Platform | Click id parameter |
|---|---|
| Facebook / Instagram | fbclid |
| TikTok | ttclid |
| Google Ads | gclid (also wbraid / gbraid on iOS app-to-web) |
| Microsoft / Bing | msclkid |
Also capture, on the same first hit: utm_source, utm_medium, utm_campaign, utm_content, utm_term, the full landing URL, referrer, user agent, and the client IP as seen by the server. Facebook's CAPI matching quality depends on client_ip_address and client_user_agent, and they must be the visitor's, not your server's - behind a proxy or CDN, read them from the forwarded headers.
Store server-side, keyed to a first-party session. Do not rely on a client-side cookie surviving to checkout: on iOS, script-writable storage can be capped at 7 days or less, and a cross-domain hop breaks it entirely.
Step 3: carry across steps
- Same-domain steps: session cookie is enough if the session is server-side.
- Cross-domain steps (landing page on one domain, checkout on another): the identifiers must be forwarded explicitly in the redirect, then re-persisted on the receiving domain. This is where most funnels silently lose attribution.
- Redirect chains: every hop must preserve the query string. A tracking redirect that drops
?fbclid=...destroys attribution for that entire campaign.
Step 4: attach to the order
The order record must carry the click ids, UTMs and landing URL. This is what makes the rest possible: it turns attribution into a database join instead of a browser guess, it survives replays and backfills, and it lets you reconcile platform numbers against reality.
Step 5: report server-to-server
| Platform | Endpoint / mechanism | Credentials needed |
|---|---|---|
| Conversions API | Pixel ID + access token | |
| TikTok | Events API | Pixel code + access token |
| Google Ads | Click conversion import (gclid-keyed) |
Conversion action + developer/OAuth credentials |
| Microsoft Bing | Conversions API | UET tag ID + CAPI token |
Send with the event: event name, event time, event id (for dedupe), order value + currency, the click id, and hashed customer identifiers (email, phone) using the platform's required normalization - lowercase, trimmed, SHA-256, and E.164 for phone numbers. Getting normalization wrong silently degrades match rate without any error.
Send from a queue with retries, not inline in the checkout request. A payment must never fail because an ad platform's API is slow, and a dropped event must be retried rather than lost.
Step 6: dedupe
…
FAQ
What are 'conversions'?
Conversions are valuable actions you want your customers to take, such as a purchase, a sign-up, or downloading a resource.
Why do ads show fewer sales than I had?
This happens because modern browsers, mobile devices (especially iPhones), and ad blockers prevent ad platforms from tracking all user actions.
Will this make the numbers from all platforms match exactly?
No, numbers can still vary slightly between platforms. The main goal is to have a more accurate and stable record of your actual sales, not perfect equality across all reports.
Details
Original description by the author
Set up server-side conversion tracking so purchases are reported accurately to Facebook, TikTok, Google and Bing despite iOS restrictions, ad blockers and cookie loss. Use when conversions are under-reported, when platform-reported purchases do not match real orders, when asked about Conversions API / Events API / offline conversions / CAPI, click id passthrough (fbclid, ttclid, gclid, msclkid), o
repo: github/awesome-copilot
Popularity
- GitHub stars
- 40k
- Ranking position
- #5365
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
acquire-codebase-knowledge
Helps your agent understand and document an existing code project. It's useful for onboarding new people or getting an overview of the architecture.
github/awesome-copilot
acreadiness-assess
Enables your agent to assess a project's readiness for AI and generate a report. It's useful for understanding how well a project is prepared to use AI tools.
github/awesome-copilot
acreadiness-generate-instructions
Helps your agent create instructions for AI tools based on an assessment. It's useful for improving how AI interacts with code and closing identified gaps.
github/awesome-copilot
acreadiness-policy
Enables your agent to help define or apply policies for AI project assessment. It's useful for standardizing how projects are evaluated and ensuring compliance.
github/awesome-copilot
Similar skills
competitive-platform-analysis
Helps understand your competitors. It identifies, categorizes, and filters competing companies before any deeper analysis.
affaan-m/ECC
competitive-report-structure
Creates comprehensive competitor reports. It combines information to show the overall landscape, recommendations, and helps align the team.
affaan-m/ECC
lead-intelligence
Helps your agent find and contact important people. It analyzes leads, suggests approaches, and manages outreach via email and social media.
affaan-m/ECC