diff --git a/contents/docs/libraries/shopify.mdx b/contents/docs/libraries/shopify.mdx index f471b173267e..0666272c4ac7 100644 --- a/contents/docs/libraries/shopify.mdx +++ b/contents/docs/libraries/shopify.mdx @@ -28,6 +28,15 @@ This guide walks you through integrating PostHog into your Shopify store using a > To confirm PostHog is configured correctly, visit your store and then check if the events from your session appear in the [PostHog activity tab](https://us.posthog.com/events). This may take a few minutes. +### If your events do not appear + +If your session does not appear in the activity tab, check these two causes first: + +- **The token is for a different project.** The capture endpoint accepts any valid project token. If you use the token of another project, your requests succeed, but the events go to that project. Compare the token in `theme.liquid` with the token in the ["Project variables" section of your project settings](https://app.posthog.com/settings/project#variables). +- **A third-party app sends the events.** If you use an unofficial Shopify app instead of the snippet, that app controls which events it sends and which token it sends them with. We cannot support these apps. Install the snippet manually with the steps above, then test again. + +For all other causes, such as ad blockers or a misconfigured library, see [Product analytics troubleshooting](/docs/product-analytics/troubleshooting#why-are-events-not-appearing-in-my-project). + ### Enabling heatmap The heatmap won't work on Shopify out of the box because Shopify has very strict CSP headers, particularly `frame-ancestors`. diff --git a/contents/docs/product-analytics/troubleshooting.mdx b/contents/docs/product-analytics/troubleshooting.mdx index 199435db4133..b6d12bcecaba 100644 --- a/contents/docs/product-analytics/troubleshooting.mdx +++ b/contents/docs/product-analytics/troubleshooting.mdx @@ -72,13 +72,17 @@ If events are visible in webhook.site, it means that you have configured PostHog ![Events visible on webhook.site](https://res.cloudinary.com/dmukukwp6/image/upload/v1710055416/posthog.com/contents/images/docs/product-analytics/events-in-webhook.site.png) -**2. PostHog is adblocked** +**2. Your events go to a different project** + +The capture endpoint accepts any valid project token and returns a success response. If you use the token of another project, PostHog ingests your events into that project. If your requests succeed but your project stays empty, compare the token in your [initialization code](/docs/product-analytics/installation) with the token in the ["Project variables" section of your project settings](https://app.posthog.com/settings/project#variables). + +**3. PostHog is adblocked** PostHog can be adblocked, even locally. This prevents requests from being sent from your app to PostHog. If you're just testing your setup in development, disable your browser ad blocker and make sure you can see PostHog requests succeeding in the network tab of your browser's developer tools. For production, the best way to limit the impact of ad blockers is to [set up a reverse proxy](/docs/advanced/proxy). -**3. An app has been configured incorrectly** +**4. An app has been configured incorrectly** Another common reason for missing events is that an app has been configured to drop certain or all events. To debug if this is the case, follow these steps in order: @@ -86,7 +90,7 @@ Another common reason for missing events is that an app has been configured to d 2. Try to temporarily disable the Filter Out plugin. 3. Try to temporarily disable all other enabled plugins. -**4. There is a bug in the PostHog library** +**5. There is a bug in the PostHog library** Sometimes, bugs in the PostHog library may be the cause of missing events. However, this is quite rare. @@ -101,7 +105,7 @@ If you're using the [JavaScript web](/docs/libraries/js) library, you can identi ![network request being sent to posthog](https://res.cloudinary.com/dmukukwp6/image/upload/v1710055416/posthog.com/contents/images/docs/product-analytics/network-request-to-posthog.png) -**5. Events are not ingested after being received by PostHog** +**6. Events are not ingested after being received by PostHog** If your library is configured correctly and successfully sending events to PostHog, events may get lost in the [ingestion pipeline](/docs/how-posthog-works/ingestion-pipeline) – e.g. if there is an ongoing outage.