Custom builds

Full-control tracking for custom-built sites.

Custom builds give you exact control over when to push events and what data to include. AtriTap generates a plan and spec that assumes engineering discipline: server-confirmed events, exact dataLayer timing, and deduplication primitives like event_id across client and server pixels.

Implementation notes

  • Initialise window.dataLayer = window.dataLayer || [] before the GTM snippet runs, in the document head.
  • Fire server-confirmed events: purchase after the payment processor webhook fires, sign_up after the user row is persisted.
  • For hybrid client/server tracking (Meta CAPI, TikTok Events API), ensure every event carries a stable event_id that matches client and server sides.
  • Feature-flag the tracking layer if you are testing configuration changes; deploy to staging first and validate in GTM Preview.

Common pitfalls

  • Pushing optimistic events before server confirmation. The user can bail out and leave a phantom conversion.
  • Letting 'type-loose' dataLayer values leak (strings where numbers are expected). GA4 silently drops these.
  • Forgetting to anonymise PII from the dataLayer. Emails and names must never be pushed as-is; use hashed variants for Meta CAPI etc.

FAQ

Can we use a framework like Next.js, Remix, or Rails?

Any framework works. The dataLayer spec is framework-agnostic. For SPAs, fire a virtual_pageview event on client-side route changes to drive GA4's page_view.

What about server-side GTM?

Server-side GTM is a significant upgrade and a Phase 2 capability. The Phase 1 plan is client-side-only; moving to server-side is a separate engineering project.