> For the complete documentation index, see [llms.txt](https://docs.getpurpledot.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getpurpledot.com/integrations/analytics/google-analytics/set-up-storefront-tracking.md). Agents can also search and read this documentation through its [MCP server](https://docs.getpurpledot.com/~gitbook/mcp).

# Set up Google Analytics storefront tracking

Install and verify Google Analytics storefront tracking before connecting Purple Dot.

Background: [How analytics integrations work](https://docs.getpurpledot.com/integrations/analytics/how-analytics-integrations-work.md#checkout-events).

## Before you start

* Your Shopify store uses the Purple Dot checkout.
* You can install Shopify apps and access the Google account for your store.

## Steps

1. Install the [Google & YouTube](https://apps.shopify.com/google) app from the Shopify App Store.
2. Open the app and sign in with your Google account.
3. Connect the store to the correct GA4 property and web data stream. Use the same destination when you [connect Purple Dot](https://docs.getpurpledot.com/integrations/analytics/google-analytics/connect.md).
4. Complete the app setup and confirm the Google tag is active on the storefront.

## Verify

1. In Shopify, go to **Settings** > **Customer events**.
2. Confirm the app is connected. Open its menu and select **Test**.

   <figure><img src="https://2758444809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM5A7csYKEplvsuQqHenE%2Fuploads%2Fgit-blob-7e9c9e37eb9c727eaba3997a3583e49dca3b7fcd%2Fanalytics-google-analytics-setup-1.png?alt=media" alt="Google &#x26; YouTube app test menu in Shopify"><figcaption></figcaption></figure>
3. Accept cookie consent for the analytics or marketing cookies used by the app.
4. Perform a storefront action and confirm events are processed. In GA4, open **Reports** > **Realtime** and confirm page views arrive.

## Troubleshooting

* [My integration is not syncing](https://docs.getpurpledot.com/troubleshooting/orders-and-inventory/integration-is-not-syncing.md)

## Related

* **Do this:** [Connect Google Analytics](https://docs.getpurpledot.com/integrations/analytics/google-analytics/connect.md)
* **Look up:** [Google Analytics events and settings](https://docs.getpurpledot.com/integrations/analytics/google-analytics/events-and-settings.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.getpurpledot.com/integrations/analytics/google-analytics/set-up-storefront-tracking.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
