# 💡How to set up Google analytics on shopify?🤔

**Step 1.** To set up **Google Analytics** on Shopify, you must have to sign up to a [**Google Analytics account.**<br>](https://analytics.google.com/analytics)\
\
**Step 2.** Next, click on the **settings** icon in Google Analytics, select **"Data Streams,".**&#x20;

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdI1TBy2rDwDa834d1rkifQFNwU8iWUypT_JTSOd0He5qCaglNVJ9VSapvarHtHHB2xLUVeUADGeWJFVvLBd03X08z47mOUXGu6f7PDZBZhs16II7OHRvLiQzxLQZ-YMTLVa1GtgHUFN_B1qcDPUClXp9N3?key=k9heDR9hpJMnQ0GrGcLQvg" alt=""><figcaption></figcaption></figure>

\
Open the **stream** you want to integrate within Shopify. Copy the **Measurement ID** from there and pass it to **Wixpa GA4.**

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdhdNaD2W6P-jONH7dk3EHFCBAADdJXhmvO68_TD6aGUZtKBepKemEkbv_MNLRujcc_bvbibJAtDOp2lF6oXqqG1mclO6hb_JozOaBZb0jgTLeDzvPm_2Z6qIt63AH4PrQtcxhwHYE2A1jidaA0mKFbU6p4?key=k9heDR9hpJMnQ0GrGcLQvg" alt=""><figcaption></figcaption></figure>

\
**Step 3.** Click **"Activate"** to enable Wixpa GA4 in your **Theme Editor.**

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeDkn46aw1UxOTddTS7cxVyF7HZ4x93fRGq6d6An2EB_IpFmS0LY3iugXCsIqQh8TmWPuQIrfTnJtwRKtRPGi-QCKQp5MD4FzM_vh8mSAyahG2N0p7dyPOGHkvJLs-MRNQJE3WKqdAcn-erqlkIzgvdQRxE?key=k9heDR9hpJMnQ0GrGcLQvg" alt=""><figcaption></figcaption></figure>

**Step 4.** Paste the **Measurement ID** you copied from Google Analytics into the designated field, then click "**Save**."

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXflWDuDo7IrcLRE8fP4AcKYxcCKbGIhq3Kvrh1NFs4cjIZEvWfCJ0tCsydj6vUDY_BB328x8J4Ozaahij7iXobYkIgo5TT1jpipQUrmF5fjGXngEqhJ-ZeiE8_AA_tQQEkpyoSvsdVmj-PqsXFETQ64FFyz?key=k9heDR9hpJMnQ0GrGcLQvg" alt=""><figcaption></figcaption></figure>

\
**Step 5.** Click "**Copy**," then select "**Customer Events**," which will take you to the Customer Events section.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeA-DB0lnqg_3_OqPDHNg1xIXWmO0sAm7Ffu72Yka_ZqCqR3SMgEi4Tej5MXCFc0qXeEBG7a5rsWwb9wet2y1kLNxmOt9n15bPZrNPmmWNS8UdHBbZs4yHU-663f5VtCtQoyQsfeQ8TyZdD90E8tE220amG?key=k9heDR9hpJMnQ0GrGcLQvg" alt=""><figcaption></figcaption></figure>

Click on **Add Custom Pixel.** <br>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcbGxFsX_JxOVzXdDGM8tfNr8ZSZ3k129EGufBNoephrjQQCgUjd0yWejzdYxTO37LcHmC9UOXXvAb4KFMdK4Kq5O4PlrStjXndNyqyw9vpZqoD34U4kEmGAvzo7horLVjjAHYYT2WWNplWq0BQiTIz0b6h?key=k9heDR9hpJMnQ0GrGcLQvg" alt=""><figcaption></figcaption></figure>

Enter the **Name** of the pixel and click on **Add Pixel.**&#x20;

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXduw4iGBti78Lqv5KupkkxzDaFpnx2esi8Zj6b4RVRTBjvkZtEtwrI9bVKlSmAdjLKJE8lwoUIy6V5_bLAm-PtuG47Bh3X8Wj2JdmrGrpT1uvUFukQxIUrgbgFum7BbT6KXysf9e7Wr08I90l6STvEZoKp8?key=k9heDR9hpJMnQ0GrGcLQvg" alt=""><figcaption></figcaption></figure>

Now, open **Permissions** and select according to your need. If you choose **Required**, the pixel will collect data based on the permissions granted by customers. And if you select **Not Required** pixels will run always and it will collect data without permission. I'm selecting Not Required.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcwXNiMN07EizFwyNUQhERTYYuOIVRgE6-Qn0vF8uaUfiUWukAAQ4imyuux2OKva9xK2-dFHP9uvxwKmzgYx5lWSMWqSju3c4Yrhz1OxAOfFAdaR9b_QaywGNd7zATlcCf9ghJPOq-wP5ohbtdPYIAdnBID?key=k9heDR9hpJMnQ0GrGcLQvg" alt=""><figcaption></figcaption></figure>

**Replace** this 7-line code with the code you copied from the app.&#x20;

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcxyI-AcVSjZ4VM8_VFe_15pTEpibxCOBntDtEAjFn9jl7GGkJKpI1ba8sG-nAtcXO2jiVwMxK68FY5gVhk8fESoLm_YWDA-7e9cNMFzfUi7bCsVhH3xfsA2572EabV2r05cZuNQtFH-yEszLPdUj_QsYR-?key=k9heDR9hpJMnQ0GrGcLQvg" alt=""><figcaption></figcaption></figure>

Then click on **Save.**

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXezDZJP7_GDtjOU3Uxgb841gZeJB_YkzPR_apa-VmVqL0nVyuVtWkZBf-v7oJ2qQS3oa-65hY89br6H8BXBR0YrqA0cMZkHU_ENEix4wGrrJwSoIZjgAsAbEV55eLGF5LTdjz9RWZgL4EsdE0jIn6g8mC4s?key=k9heDR9hpJMnQ0GrGcLQvg" alt=""><figcaption></figcaption></figure>

Now **connect** it.&#x20;

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdS_PHO0ySg1bQ91rdA2oQdXr4chtABHv-dlochRRkXKQe_ikNzD7eVvTGnySwZXipbJBAKvuWpsKNAKmex19ztl-TejI07QN3G3kA0cKlNN1sale4bSbF8XzTVk6S8YstafpkYbxqYjnyJ9soGB11xoROu?key=k9heDR9hpJMnQ0GrGcLQvg" alt=""><figcaption></figcaption></figure>

Your setup is **done successfully**🤩.&#x20;

{% embed url="<https://youtu.be/l9mSrQ4UxMc?si=oAPzsL7arjLvpLX->" %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wixpa-feed.gitbook.io/wixpa-ga4/wixpa-ga4/how-to-set-up-google-analytics-on-shopify.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
