Skip to content
PostHog logoPostHog logo

PostHog

PostHog integration

PostHog is product analytics with replay, flags and experiments in one tool. We reach for it on headless and app-heavy stores where GA4 is not enough.

UPDATED OCT 2026 · SOURCES (5)

POSTHOG INTEGRATION AT A GLANCE

COMPLEXITY

Medium

METHOD

Shopify: ScriptPlus: Script + pixelHydrogen: SDK

TYPICAL SETUP

1 week

WHAT WE DO

Install the SDK, define the event schema, set up funnels, session replay and feature flags, and wire experiments into the storefront for headless builds.

CATEGORY

Analytics

SETUP BY PLATFORM

How we set up PostHog

S

Shopify

SCRIPT

PostHog on Shopify (Script): Install the SDK, define the event schema, set up funnels, session replay and feature flags, and wire experiments into the storefront for headless builds.

Shopify store builds →
S

Shopify Plus

SCRIPT+ PIXEL

On Shopify Plus (Script + pixel): everything in Shopify, plus the Plus-only hooks (checkout extensions, B2B, Launchpad) where PostHog can use them.

Shopify Plus →
H

Hydrogen

SDK

On a headless storefront (Hydrogen, Astro or Next.js) we connect PostHog through SDK and own the event and data mapping ourselves.

Headless builds →

USE CASES

What teams use it for

01

Funnels

Product-level funnels with properties GA4 cannot capture.

02

Feature flags

Ship storefront features to a percentage of traffic.

03

Experiments

A/B tests on Hydrogen and Astro storefronts without a third-party script.

BEFORE YOU ADD IT

What to watch out for

SCHEMA

Define events first

Autocapture is noisy. A written event schema keeps analysis usable.

COST

Usage-based pricing

Replay and events are billed by volume. Sample replay.

HOSTING

EU or US cloud

Choose the region before data arrives; it cannot be moved later.

05

PostHog on Shopify, in practice

PostHog is product analytics for teams who want event-level data, funnels, session replay and feature flags in one tool they can self-host, which makes it the choice for headless Hydrogen and Next.js storefronts and for stores with a developer on staff.

On a theme-based store we install the snippet and send the same ecommerce events GA4 gets — product view, add to cart, checkout steps, purchase — plus the storefront interactions GA4 ignores: filter use, size guide opens, variant switches, search with no results. On a headless store the SDK runs server and client side and feature flags drive A/B tests without a third-party testing tool.

PostHog is more than most Shopify stores need, and we say so. It pays off when the team ships storefront changes weekly and wants to measure each one, or when privacy requirements make self-hosting the only option. If the real question is 'which marketing channel works', GA4 and Looker Studio answer it more cheaply.

FAQ

Questions about PostHog

Can’t find your answer?

Book a call and let’s talk.

Book a call
Is PostHog a replacement for GA4?

Usually not. PostHog adds event-level funnels, replay and flags, and it is more than most Shopify stores need. If the real question is which marketing channel works, GA4 and Looker Studio answer it more cheaply.

Does PostHog work on a Shopify theme store?

Yes. We install the snippet and send the same ecommerce events GA4 gets, plus interactions GA4 ignores, such as filter use, size guide opens, variant switches and searches with no results.

Can we run A/B tests with PostHog?

Yes. Feature flags drive A/B tests on Hydrogen and Astro storefronts without a third-party testing tool, and on headless builds we wire experiments into the storefront.

Is PostHog self-hostable?

Yes, it is a tool teams can self-host, which matters when privacy requirements make self-hosting the only option. On the cloud version, choose the EU or US region before data arrives, because it cannot be moved later.

You've reached the end, so now…

Tell us what you're selling.

Send us your store. Within one business day you get a short Loom from a senior: the three things we'd fix first, what it would cost, and whether we're the right team for it.

  • No pitch deck, no discovery-call theatre
  • You keep the audit whether or not you hire us
  • Fixed-scope quotes, no hourly surprises
Haniel Singh

Prefer to talk? Book 20 minutes with Haniel or call +1 855-764-4977

Get a free store audit

Takes 40 seconds. Reply within one business day.

What do you need?

We read every one. No newsletter, no drip sequence.