# Acme Analytics: tracking stack (fictional example of martech-context/stack.md)

The worked example reads this file first. It shows the fields the audit needs. A real one holds no secrets.

## Sites and hostnames

- www.example.com: marketing site on the CMS. The demo form posts to the HubSpot Forms API from /assets/demo-form.js.
- app.example.com: single-page app for signup, projects and billing.
- pay.example.net: hosted checkout run by the payment provider. It cannot be tagged and returns visitors to app.example.com/billing/success.
- sgtm.example.com: server container for GA4 and the Meta Conversions API. Owner: data engineering.
- Acme owns the registrable domain example.com. pay.example.net belongs to the payment provider.

## Tag management

- Web container GTM-XXXXXXX on www and app, loaded with gtm.js in the page head.
- Publishers: web analytics lead and one deputy (agreed limit: three).

## Expected destination IDs

- GA4: G-XXXXXXXXXX, one property, one web stream, all hits through sgtm.example.com.
- Google Ads: AW-123456789 in customer 123-456-7890. Actions: Demo request (website, primary), Paid plan purchase (website, primary), purchase (GA4) imported for reporting only.
- Meta pixel 1234567890123456: PageView, Lead (browser only), Purchase (browser plus Conversions API).
- LinkedIn Insight Tag, partner 1234567: page views only, no conversions.
- HubSpot portal 7654321: tracking code and forms on www only.

## Retired IDs

- Hotjar site 3333333, removed 2026-06-30. Nothing should send to it.

## Server and native routes

- GA4: every event through sgtm.example.com.
- Meta Purchase: sent by the server container with event_id set to the order reference. The browser Purchase must send the same value as eventID.
- Google Ads: website conversions from the browser; qualified leads imported through the Google Ads Data Manager HubSpot connection, which reads the custom gclid property. It is not a Google Ads API uploader, so the 15 June 2026 upload change does not stop it.
- First-party collection endpoints: sgtm.example.com, GA4 client at /g/collect. No tag gateway, proxied vendor paths, CNAME collectors or other data clients.

## Consent

- CMP template served from cdn.consent.example.org; the choice is logged to cdn.consent.example.org/cmp/v2/log.
- Decision (decisions.md, 2026-03-15): UK and EEA are opt-in. Advanced consent mode for Google tags. Non-Google advertising tags require ad_storage, ad_user_data and ad_personalization. LinkedIn, Meta, TikTok and HubSpot tracking sit in the marketing category.
- URL passthrough off; ads data redaction off. No Microsoft Ads (UET) or OpenAI Ads pixel.
- Essential cookies: the CMP's consent cookie and the app's session cookie.
- Region tested from IP egress: UK.

## Values and identifiers

- Value rule: every destination receives the net plan price excluding VAT, in USD.
- transaction_id, Meta event_id and the Google Ads order ID all use the billing order reference.
- Click ID policy: the demo form script writes hidden fields into the custom HubSpot properties gclid, utm_source, utm_medium and utm_campaign; first touch kept on the contact. HubSpot also fills its own Google ad click ID and Facebook click ID properties itself. The offline import reads the custom gclid property.
- Enhanced conversions for Google Ads: approved after a grant (decisions.md, 2026-05-02).

## Owners (by role)

- Web analytics lead: GA4, GTM, this audit.
- Growth lead: budgets and the UTM registry.
- Paid media lead: Google Ads, Meta and LinkedIn accounts.
- Privacy owner: consent model, CMP categories, deletion requests.
- CRM admin: HubSpot properties, forms and the Data Manager HubSpot connection.
- Data engineering: server container and its logs.
- Web team: CMS theme and forms. App team: signup, SPA and billing pages.
