```html

Cross-Domain GA4 Session Stitching: Fixing Attribution Loss Between queenofsandiego.com and sailjada.com

The Problem: Broken Session Continuity Across Domains

During a comprehensive Google Analytics audit of our dual-domain booking funnel, we discovered a critical attribution gap: approximately 60 pages on queenofsandiego.com were firing GA4 events correctly, but lacked the cross-domain linker configuration. This meant that whenever a user navigated from Queen of San Diego (the marketing/event information site) to Sailjada (the booking engine), the session broke. Conversions that should have been attributed to "charter_booking" or "generate_lead" on the QOS side were instead showing up as "direct" traffic on sailjada.com, destroying our attribution model and making it impossible to measure true conversion funnel performance.

Additionally, three critical pages on QOS were missing Google Analytics instrumentation entirely: the main charters landing page, the Nerissa-specific charter page, and the post-booking thank-you page.

Technical Audit Scope

We conducted a complete inventory across both properties:

  • Property ID: G-N6HKL4KLKT (GA4) — single unified property for both domains
  • sailjada.com: 22 public pages — all correctly instrumented with GA4 + cross-domain linker
  • queenofsandiego.com: ~85 public pages total
    • ~60 pages with GA4 but missing cross-domain linker (all Rady Shell event pages, Captain's Log articles, main landing pages)
    • 3 pages missing GA entirely
    • ~22 pages correctly configured

Root Cause: Incomplete gtag Configuration

The sailjada.com pages used the correct pattern:

<script async src="https://www.googletagmanager.com/gtag/js?id=G-N6HKL4KLKT"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'G-N6HKL4KLKT', {
    'allow_google_signals': true,
    'allow_ad_personalization_signals': true,
    'linker': {
      'domains': ['queenofsandiego.com', 'sailjada.com']
    }
  });
</script>

Most QOS pages omitted the 'linker' object entirely, or had incomplete domain lists. Without this configuration, gtag's automatic link decoration — which appends the _gl parameter to cross-domain navigations — never fires. The session ID never propagates, and GA4 treats the user as a new session.

The Fix: Automated gtag Configuration Standardization

We created a Python script (/tmp/fix_ga.py) that:

  1. Parsed all HTML files in the QOS S3 bucket structure (served from CloudFront distribution E2MLBZVR48STAG) to find incomplete gtag('config'...) calls
  2. Injected the missing linker configuration into 60 non-compliant pages, ensuring the linker object included both queenofsandiego.com and sailjada.com
  3. Added complete GA4 instrumentation to the three missing pages: /charters/index.html, /charters/nerissa/index.html, and /thank-you/index.html
  4. Validated the fix by re-parsing all modified files to ensure valid JavaScript and correct linker domain arrays
  5. Deployed updates directly to S3 buckets serving both the apex domain and Rady Shell subdomain
  6. Invalidated CloudFront caches for all affected distributions to ensure immediate propagation

Infrastructure & Deployment Details

S3 Buckets Modified:

  • queenofsandiego.com (apex domain bucket)
  • radyshell.queenofsandiego.com (subdomain bucket for event pages)

CloudFront Distributions Invalidated:

  • E2MLBZVR48STAG (www.queenofsandiego.com distribution)
  • Apex queenofsandiego.com distribution
  • Rady Shell subdomain distribution
  • sailjada.com distribution (cache validation only, no changes needed)

All file updates were committed to the source repository, ensuring that future deployments via CI/CD will include the corrected GA configuration. The linker configuration is now idempotent — redeploying the same files will not create duplicates or broken syntax.

Key Architectural Decisions

Why a Single GA4 Property? Both domains serve a unified booking funnel (awareness on QOS → conversion on sailjada). A single property lets us measure end-to-end user journeys without post-processing. The linker is the glue that makes this work.

Why gtag Over Google Tag Manager? Both sites use gtag (direct instrumentation). GTM would add complexity here without benefit, since we're not doing event rule logic — just simple page tracking and cross-domain stitching.

Why S3 + CloudFront Instead of Server-Side Injection? These are static sites. Modifying HTML at source is simpler, faster, and more auditable than middleware injection. Cache invalidation is explicit and traceable.

What's Next

The immediate linker fix is in production. Secondary improvements queued for the next phase:

  • Event Enrichment: Add view_item events to charter detail pages (/charters/*/index.html) to track engagement with specific boats before checkout
  • Video Tracking: Instrument hero video plays on landing pages with custom video_engagement events
  • Enhanced E-commerce: Map sailjada.com checkout steps to GA4 e-commerce events for better funnel visualization
  • Cross-Domain Reporting: Build a custom Looker Studio dashboard that shows QOS → sailjada conversion paths, now that session stitching is reliable

All source files have been validated. Session stitching between both domains is now active, and every user journey from Queen of San Diego to booking confirmation will be tracked as a single session.

```