Skip to main content

Google Tag Manager (Web `GTM-PGPK24VR`, Server `GTM-NHVBMP3D`)

Purpose: document current GTM setup, identity handling, event routing, and dependencies.

Loader and hosting

  • Custom loader served via Stape first-party domain https://load.data.automates.tech/… (see Client GTM Config CSV). Noscript iframe points to https://load.data.automates.tech/ns.html?id=GTM-NBX26482.
  • Web container ID: GTM-PGPK24VR. Server container ID: GTM-NHVBMP3D (sGTM).
  • CMP: Termly; tags listen to userPrefUpdate and consent events. Confirm Consent Mode mapping and geo rules.

Accounts and coverage

  • Stape: hosts the custom loader and server container endpoints.
  • GTM: web GTM-PGPK24VR, server GTM-NHVBMP3D.
  • Termly: consent signals drive firing.
  • Ads/analytics in scope: Meta, LinkedIn, Pinterest, Reddit, Google Ads; GA4 via sGTM; Clarity; Cloudflare Browser Insights.
  • Not installed by us yet: Floodlight (note if/when added).
  • Forms: Webflow native and OpnForm embeds (identity propagation required).

Identity model (_c_pca)

  • First-party ID stored in both localStorage and cookie _c_pca.
  • Priority: URL parameter c_pca (when present) → localStorage → cookie → generated ID.
  • Updated form helper (Webflow and OpnForm) to set hidden field hidden-field1 and OpnForm user_id param using localStorage-first logic:
    <script>
    const COOKIE_NAME = '_c_pca';
    window.addEventListener('load', function () {
    setTimeout(function () {
    const lsVal = localStorage.getItem(COOKIE_NAME);
    const cookieMatch = document.cookie.match(new RegExp('(?:^|; )' + COOKIE_NAME + '=([^;]*)'));
    const cookieVal = cookieMatch ? cookieMatch[1] : null;
    const cidValue = lsVal || cookieVal || "nocookie";
    const hiddenField = document.querySelector("#hidden-field1") || document.querySelector("input[name='hidden-field1']");
    if (hiddenField) hiddenField.value = cidValue;
    const opnformIframe = document.querySelector('.contact-v2-wrap.opnform iframe');
    if (opnformIframe && opnformIframe.src) {
    const url = new URL(opnformIframe.src);
    const params = new URLSearchParams(url.search);
    let updated = false;
    for (const [key, value] of params.entries()) {
    if (value === "user_id") { params.set(key, cidValue); updated = true; break; }
    }
    if (updated) { url.search = params.toString(); opnformIframe.src = url.toString(); }
    }
    }, 1000);
    });
    </script>
  • GTM variables: Client ID Query, Calculated Client ID, Client ID - URL/Local Storage/1st Party Cookie, New Client ID. See GTM Documentation.md for the corrected lookup.

Web container highlights (workspace11 lineage; prior doc workspace9)

  • Key tags: Server Google Tag (config), GA server events (content view, key clicks/forms, 404, video), Meta Pixel, LinkedIn Insight, Pinterest base, Microsoft UET + Clarity, Reddit base, Google Tag AW-17079344453, Termly CMP, rB2B widget, Conversion Linker.
  • Key triggers: consent init for ID setting, Termly userPrefUpdate, element visibility for content/video, form submissions, link/button clicks, 404 detection.
  • Key variables: Tracking Server URL - Change, Server Google Tag ID - Change, Measurement ID (server), Meta Pixel ID - Change, LinkedIn Partner ID - Change, Pinterest - Tag ID, Microsoft Clarity - Change, Reddit Pixel ID, Termly UUID - Change, client ID helpers, event naming prefix/suffix handlers, unique event ID.
  • Client ID setting tags are now unified per GTM Documentation.md (older “Set Client ID - Local Storage/Cookie” should remain paused).

Server container highlights (workspace10)

  • GA4: Measurement ID G-TPFS2Z0HNJ (Measurement ID and Server Google Tag ID - Change vars). Tags: GA4 - Base (Client Name = GA4), GA4 - All Events, GA4 Advanced - Lead (event generate_lead).
  • Google Ads: Conversion ID 17079344453; label lookup maps lead_form_submit to _s7WCJf7mscaEMW6iNA_. Conversion Linker enabled.
  • Meta CAPI: Pixel ID 1743482129607086; event name map (lead_form_submit→Lead, newsletter/demo placeholders marked INSERT); fbp/fbc extracted; Access Token stored in variable.
  • LinkedIn CAPI: Conversion ID lookup (Lead22422434); Access Token stored in variable. One legacy tag paused (LI Tag Template - Lead Server 19266098).
  • Pinterest CAPI: Advertiser ID 549769377338; Access Token stored in variable.
  • BigQuery logging: tag “Write to bigquery” writes full event data to pacing-agency-we-1733769538574.SGTMtoBQ1pacing.pacingeventssgtm1.
  • Clients: GA4 client and GTM client allow containers GTM-PGPK24VR and GTM-NHVBMP3D.
  • Triggers: All Events, All Marketing Events (lead/newsletter/demo forms), Meta/LinkedIn/Google Ads Specific Events, Event - generate_lead, exclusions for GA.

Event specification (client + server)

  • Base client events: page_view, scroll_75, key button/link clicks, form submissions (newsletter_, contact_, lead_), video events, 404, view_content variants (using class/id naming with glob- prefixes).
  • Server routing per spec: GA4 receives all. Ads (Google Ads, Meta, LinkedIn, Pinterest) receive lead_form_submit and demo_form_submit; other events are GA-only unless expanded.
  • Forms marked “Authenticated” carry the first-party ID via hidden field or backend handoff.

Exported Resources

  • scripts/resources/gtm/GTM-PGPK24VR_workspace11.json: Web container export (workspace11).
  • scripts/resources/gtm/GTM-NHVBMP3D_workspace10.json: Server container export (workspace10).

Known dependencies and docs

  • Specs: Automates Tech - Analytics Specification Blueprint - Event Specification.csv; form handling in Automates Tech - Analytics Specification Blueprint - Authentication & Form Handling.csv.
  • Loader snippet and notes in Automates Tech - Analytics Specification Blueprint - Client GTM Config.csv.
  • Change log and client ID fixes: /Users/benpower/VSC/Pacing Website GTM/GTM Documentation.md and UpdateSummary.md.
  • Totuus server-side tracking proposal outlines first-party ID and client/server GTM build (24 Oct 2024) Totuus Serverside Tracking Proposal (file link).

Outstanding checks

  • Confirm current Consent Mode mapping to Termly signals.
  • Validate whether Floodlight is still required; document advertiser/config IDs if active.
  • Confirm tracking server hostname in use (variable-driven in web container).
  • Ensure OpnForm embed consistently receives _c_pca; monitor iframe load timing.
  • Rotate/secure stored API tokens (Meta/LinkedIn/Pinterest) as standard practice.

TODO (GTM/Tracking)

  • Confirm Consent Mode mapping to Termly and any geo rules.
  • Document production tracking server hostname and Stape endpoint.
  • Validate need/timing for Floodlight and capture advertiser/config IDs if enabled.
  • Verify OpnForm embed consistently receives _c_pca; note load timing approach.
  • Inventory API tokens/IDs (Meta, LinkedIn, Pinterest, Reddit, Google Ads) and owners.