Skip to content

Cross-Domain Tracking Issue Between Hydrogen Site and Shopify Checkout #29

@TrevHeath

Description

@TrevHeath

Issue Description

We're experiencing broken user funnels due to distinct_id changes when users navigate between our main Hydrogen site (host.com) and Shopify checkout (checkout.host.com).

Current Setup

  • Main site: Custom PostHog implementation on Hydrogen (host.com)
  • Checkout: PixieHog on Shopify checkout (checkout.host.com)
  • Problem: Different distinct_ids are generated for the same user across domains, breaking funnel tracking

Our Hydrogen PostHog Configuration

window.posthog.init(POSTHOG_KEY, {
  api_host: 'https://us.i.posthog.com',
  capture_pageview: false,
  cross_subdomain_cookie: true,
  persistence: 'localStorage+cookie',
  cookie_domain: '.host.com',
});

Our Shopify Pixiehog app is showing an action required warning because it seems the app embed isn't properly configuring on the checkout.

Image

Questions

  1. Does PixieHog support cross-domain tracking with custom PostHog implementations?
  2. What's the recommended approach to maintain user identity between our Hydrogen site and Shopify checkout using PixieHog?
  3. Does PixieHog automatically use the same cookie_domain setting (.host.com) for cross-subdomain tracking?

Expected Behavior

Users should maintain the same distinct_id when moving from host.comcheckout.host.com to preserve funnel tracking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions