# 4-Layer Tracking Kit: from the ad click to the closed deal in HubSpot

By Bitencourt & Co. · https://lp.bitencourtco.com/kit-tracking/en/ · $49 one-time · 7-day refund window · sold on Gumroad

Implementation manual for end-to-end server-side tracking: Meta Pixel, Conversions API, server-side GTM and HubSpot deal stages back to Meta, with qualified, disqualified and won deals. 13 failure modes and an AI-ready file to implement with Claude or ChatGPT.

## The problem

Your campaign records leads. HubSpot records who qualified and who bought. That information almost never reaches Meta, so the algorithm keeps optimizing for whoever fills in the form.

The signal leaks in three places:

1. **Browser.** iOS opt-outs, Safari's cookie limits and ad blockers drop the event before it leaves the page. Handled in layers 1 to 3.
2. **Attribution.** Without email, phone or a click ID, Meta can't tie the conversion to a person or an ad. Handled in layers 1 and 3.
3. **CRM.** Qualification and sales happen in HubSpot, days later, where no pixel sees them. Handled in layer 4.

## The four layers

1. **Origin.** The event is born on the page with a unique `event_id` and pushed to the `dataLayer`.
2. **Web GTM.** Initializes the pixel and forwards conversion events to your own server, respecting consent.
3. **Server + Conversions API.** GTM Server on a VPS with Docker resends to Meta with the same `event_id`, deduplicated with the pixel.
4. **HubSpot back to Meta.** A Python polling bot reads deal stage changes through HubSpot's API (version 2026-03) and sends Qualified, Disqualified and Purchase with the deal amount, with a paid-origin gate.

## What's inside

- Value sheet, filled in once
- Branches for Framer, WordPress, Webflow, HubSpot CMS and custom apps
- VPS vs managed hosting (Stape, Cloud Run), sizing and reference prices
- HubSpot setup with a Service Key, contact properties, pipeline and stage IDs
- When HubSpot's native Meta conversion events are enough, and when they aren't
- Consent: GDPR/ePrivacy opt-in, US state opt-out and GPC, Consent Mode v2 in the right order
- 12-step validation ladder
- 13 silent failure modes: symptom, cause, diagnosis and rule
- Appendix: Meta Lead Ads webhook into HubSpot
- Appendix: HubSpot API pitfalls
- Printable implementation checklist
- The whole manual as a Markdown file with a ready prompt for Claude or ChatGPT

Formats: 47-page PDF manual and `.md` file for AI. Version 1.0 EN, November 2026.

## What you need

- A site, landing page or form that generates leads
- Access to Meta Business Manager, Google Tag Manager and your site's CMS
- A Linux VPS with a terminal, or a managed server-side GTM service
- HubSpot with Super Admin or developer access to create a Service Key

## What it doesn't promise

More signal doesn't lower cost per sale on its own. Data quality, conversion volume and campaign setup still decide. What changes is that campaigns get the right signal to learn from, and you can judge them by qualified leads and sales.

## Contact

suporte@bitencourtco.com · Portuguese version (RD Station CRM): https://lp.bitencourtco.com/kit-tracking/
