Output formats
GTM container, GTM Custom HTML, or direct script.
Every TrackingCoder generation produces code in three formats. You pick the one that suits your install path. The output is deterministic: the same inputs always produce a byte-identical file, which means you can regenerate without surprises.
The three formats
GTM container JSON (recommended)
A native Google Tag Manager container export: tags, triggers, variables, all in a single JSON file. The fastest path is the Add to Google Tag Manager button on the results page, which places everything in your GTM workspace for you: no file handling at all. Prefer manual? Import the downloaded file into your workspace (Admin → Import Container → Merge → Rename conflicting tags), publish, done. This is the cleanest install path: no copy-pasting into a Custom HTML tag, no risk of breaking other tags in your workspace.
TrackingCoder uses the same export format Google publishes. If you've ever exported a GTM container manually, this file will look familiar.
GTM Custom HTML pusher
A self-contained <script> block that lives inside a single GTM Custom HTML tag. The tag installs a dataLayer pusher on page load; you create one Custom Event trigger in GTM, point a GA4 Event tag at it, and you're set. Useful when you don't have permission to import a container, or when your workspace governance requires manual tag creation.
Direct script (no GTM)
A standalone JavaScript snippet that calls gtag(), fbq(), etc. directly, no GTM in between. Paste it into your site's <head> (or a global script slot in your CMS). TrackingCoder includes the platform's base loader script too, so a fresh site goes from zero analytics to a fully-firing event in one paste.
Which one should you pick?
- You already use GTM → GTM container JSON.
- You use GTM but need a single Custom HTML tag for governance reasons → GTM Custom HTML pusher.
- You don't use GTM and don't want to → Direct script.
Determinism & regeneration
Same inputs = same output, every time. The container's fingerprint and exportTime fields are derived from a hash of your inputs (scenario, channel, parameters, org, hostname), not from Date.now(). Re-importing a regenerated container into the same GTM workspace updates tags in place by name. GTM doesn't see it as a new install. This is what makes the free backfill flow safe.
Common questions
I imported the container but my old tags are still there. GTM's "Merge" mode only adds + updates tags whose names match the new import. It does not delete tags that exist only in your workspace. If you have a stale "TC Pusher" tag from a renamed scenario, pause or delete it manually in GTM.
Can I edit the tag after import? Yes, but be aware: if you regenerate later and re-import, GTM will overwrite your edit. Keep customisations on a separate tag if you can.
⚠ Don't forget to Publish