Machina

Appendix A·Appendix

The Anonymized Configuration Record

This appendix records the state of GA4 property 534525683 after the reconstruction described in Chapters 6 through 13, captured in July 2026. It is a reference, not a narrative. Each setting appears with its value and a one-line justification so that a future engineer, or the property owner, can read the configuration and understand not only what is set but why it holds that value. The reasoning behind each decision lives in the chapter cited alongside it; this record is the flattened result.

Anonymization follows the convention used throughout the dissertation. The client is {COMPANY}, a pest-control operator serving Monterey, Santa Cruz, San Benito, and Santa Clara counties in Central California. The production domain is {company-domain}. The brand string inside identifiers is {company}. Numeric identifiers that a reader would need to reconcile against Google's own consoles (property, stream, measurement ID, Cloud project, service account project) are preserved verbatim, because they carry no personal data and anonymizing them would break the record's usefulness as a worked example.

Values here reflect the post-Phase-2 state. Settings that Google's API refused to change (the inert purchase key event) are recorded as they stand, with the refusal noted, because a truthful configuration record shows what an operator cannot alter as well as what they can.

A.1 Property and Stream Metadata

FieldValueNote
Property ID534525683The GA4 property under audit and reconstruction.
Measurement IDG-WH410Z73V1The tag identifier the gtag config loads on {company-domain}.
Web stream ID14548640408The single web data stream; no app or measurement-protocol-only streams exist.
Google Cloud projectgen-lang-client-0444184725Hosts the automation service account and the BigQuery export dataset.
Time zoneAmerica/Los_AngelesAligns report day boundaries to the counties served, so seasonal cuts read correctly.
CurrencyUSDThe unit for the per-service lead value map in A.9.
Industry categoryHOME_AND_GARDENThe closest GA4 category to residential and commercial pest control.
Created2026-04-24Property age bounds every "lifetime" claim; the server event never fired before the fix.

A.2 Custom Dimensions

Eleven custom dimensions are registered. Eight predate the reconstruction; service_type, cta_label, and error_message were added in Phase 1 to give the corrected server event and the click and error events queryable dimensions. Scope is load-bearing: user-scoped dimensions describe the person across the session, event-scoped dimensions describe a single hit. The taxonomy rationale is in Chapter 8, Event Taxonomy and Custom Dimensions.

DimensionScopeNote
cta_locationEventWhere on the page a call-to-action fired, so click reports separate header, hero, and footer.
session_sourceUserThe only user-scoped dimension; carries an acquisition label across the visitor's events.
page_typeEventClassifies each page_view as home, service, location, pest, or job for content analysis.
job_slugEventIdentifies the careers posting tied to a career_application_submit.
location_slugEventIdentifies the city or county page, enabling by-county seasonal analysis.
service_slugEventIdentifies the service page, the axis for the by-service demand cut.
form_sourceEventNames which form emitted the event (contact, quote, header panel), renamed from form_name for consistency.
pest_slugEventIdentifies the pest page, letting termite and rodent interest track against season.
service_typeEventRegistered in Phase 1; carries the server generate_lead's service so lead value maps to service.
cta_labelEventRegistered in Phase 1; captures the button text on cta_click for copy-level analysis.
error_messageEventRegistered in Phase 1; safe because the code sends only bounded codes (server_error, network_error), never user text.

A.3 Key Events

Five events are marked as key events, plus the GA4 default purchase, which remains registered but inert. generate_lead was promoted to a key event in Phase 1 once the server-side Measurement Protocol path was corrected and verified to reach GA4. cta_click was deleted as a key event because a click is an engagement signal, not a conversion, and counting it as one inflated the conversion figure. Conversion design is argued in Chapter 7, Conversion Architecture.

Key eventStatusNote
generate_leadKey eventThe server-side conversion, now reaching GA4 via the corrected endpoint; the ad-block-resistant lead signal.
contact_form_submitKey eventThe working client-side lead event; kept as a key event pending one canonical conversion at Ads-link time.
quote_form_submitKey eventThe quote-panel lead; retained alongside contact_form_submit to maximize capture until the Ads link forces a choice.
call_button_clickKey eventProxy conversion for a phone-heavy business; true call outcomes await a paid call-tracking tool (deferred, Chapter 11).
career_application_submitKey eventLow-volume hiring conversion; the duplicate server career_application event was removed rather than renamed.
purchaseRegistered, inert, not a key eventA GA4 default that never fired; the site has no ecommerce.

Two API behaviors are recorded for the next engineer. The cta_click key event was deleted cleanly. The purchase key event could not be deleted: the Admin API returned "The event cannot be deleted" with INVALID_ARGUMENT. It is harmless because no code path emits a purchase event, so it will never register a false conversion.

A.4 Data Retention

SettingValueNote
Event data retentionFOURTEEN_MONTHSRaised from the TWO_MONTHS floor via one dataRetentionSettings PATCH; not retroactive, applies in about 24 hours.
Reset on new activity(unchanged)The retention window governs Explorations and funnels that use custom dimensions, not standard aggregate reports.

The 14-month cap matters only for Explorations and funnels keyed on event- or user-scoped custom dimensions, since GA4 standard aggregate reports retain effectively indefinitely. That is precisely the by-service and by-county seasonal analysis this business runs, so the raise is not cosmetic. See Chapter 12, Warehousing and Reporting, for why BigQuery export makes even 14 months a soft floor.

A.5 Enhanced Measurement

All seven Enhanced Measurement options were on at audit. Two were switched off in Phase 1 because they double-fired events the site already emits from its own gtag calls: pageChangesEnabled duplicated page_view on client-side navigation, and formInteractionsEnabled auto-fired GA4's own form_start and form_submit, colliding with the site's custom form events. Site search stays on although the site has no search box; it emits nothing without a query parameter, so it is inert rather than harmful.

OptionStateNote
ScrollsOnPassive engagement signal; no collision with custom events.
Outbound clicksOnCaptures clicks to third-party domains the site does not otherwise instrument.
Site searchOnInert; the site has no search box, so no search_term ever fires.
Video engagementOnHarmless; fires only on embedded video, which is rare on the site.
File downloadsOnCaptures PDF and document downloads without custom code.
Page changesOffDisabled in Phase 1; it double-fired page_view against the RouteAnalytics component.
Form interactionsOffDisabled in Phase 1; it duplicated the site's form_start and contact/quote submit events.

The page_view centralization that made pageChangesEnabled redundant is documented in Chapter 7. A single RouteAnalytics client component now fires one page_view per route with send_page_view:false set in the config.

A.6 Google Signals

SettingValueNote
Google SignalsDisabledConfirmed already off; at ~500 sessions/month it mainly triggers data thresholding that hides report rows.

At this property's volume the harm from Signals is not privacy exposure but reporting suppression: cross-device modeling adds little, while thresholding withholds rows to protect anonymity. Chapter 10, Privacy and Consent by Design, sets out the trade.

SettingValueNote
Daily exportEnabledSet in the GA4 UI by the owner; free at ~5 MB/month against the 10 GB storage and 1 TB scan free tier.
Streaming exportOffStreaming is the only export that bills; daily does not, so it stays off.
Dataset locationUSMatches the property's operating region and the Cloud project default.
Linked projectgen-lang-client-0444184725The same project that hosts the automation service account.

The link was created in the UI, not the Admin API, on purpose. bigQueryLinks.create returned HTTP 403 for the service account even after GA4 Administrator and roles/bigquery.admin were granted, because the flow makes GA grant its own export service account project-level IAM, which needs project-IAM-admin permission the automation account should not hold. The Admin API then confirmed dailyExportEnabled: true and streaming off. The permission boundary is analyzed in Chapter 15, Access and Permissions Model.

Two gtag('consent','default',...) calls run before the config. The global default grants analytics and ad storage so US collection is unaffected; a region-scoped default then denies storage for 32 EEA, UK, and Switzerland region codes, with wait_for_update set to 500 ms so late consent signals still apply.

SettingValueNote
Global defaultGrantedUS-only operator; granting keeps analytics and ad_storage active for all US traffic.
Regional defaultDenied for 32 region codesCovers EEA, UK, Switzerland; denies storage where Consent Mode v2 is a Google Ads requirement.
wait_for_update500 (ms)Holds tags briefly so a consent-management update can arrive before hits send.
gtag('consent', 'default', { analytics_storage: 'granted', ad_storage: 'granted' });
gtag('consent', 'default', {
  analytics_storage: 'denied', ad_storage: 'denied',
  region: ['AT','BE','BG','HR','CY','CZ','DK','EE','FI','FR','DE','GR',
           'HU','IE','IT','LV','LT','LU','MT','NL','PL','PT','RO','SK',
           'SI','ES','SE','IS','LI','NO','GB','CH'],
  wait_for_update: 500,
});

Consent Mode v2 is an EEA, UK, and Switzerland Google Ads requirement, not a US legal mandate for this California-only business. The defaults are a posture that costs nothing in the US and stays compliant if the business ever advertises into those regions. No cookie banner was added; Chapter 10 explains why the defaults suffice for a US-only local operator.

A.9 Per-Service Lead Value Map

The corrected server generate_lead sends a per-service value instead of the flat 150 the old code sent. Every figure is a provisional internal estimate, never shown to a customer, used only to weight conversions for future value-based reporting and bidding. The mechanism lives in Chapter 9, Identity, Attribution, and Value.

Service keyValue (USD)Note
termite400High-ticket structural work; among the most valuable lead types.
fumigation500The top value; whole-structure tenting jobs carry the largest tickets.
commercial400Recurring commercial contracts weighted like termite work.
bed-bug250Multi-visit treatment, mid-high value.
rodent180Seasonal, moderate ticket, higher volume in cooler months.
general150The catch-all baseline for undifferentiated general pest leads.
pest150Generic pest inquiries, weighted at baseline.
ant100Common, lower-ticket treatments.
wasp-bee100Single-visit stinging-insect removal, lower ticket.
other120Fallback for named-but-unmapped services.
default150Applied when service_type is absent, matching the general baseline.

A.10 Not Linked (Recorded for Completeness)

IntegrationStateNote
Google AdsNot linkedgoogle/cpc spend exists, yet no link; the offline-revenue loop (Chapter 11) is built to be ready when the owner links it.
Search ConsoleNot linkedNeeds Administrator (now held) plus verified Search Console ownership, which is the owner's to grant.

These two absences are deliberate and are the highest-leverage open items. The reconstruction laid the foundation (corrected conversions, wbraid and gbraid capture, a lead_id per lead, and stage and job_value columns) so that linking Google Ads becomes a configuration step rather than an engineering project. Chapter 11, The Offline-Revenue Loop, and Chapter 16, Lessons, Limitations, Future Work, carry these forward.