> For the complete documentation index, see [llms.txt](https://docs.saas.haut.ai/haut.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.saas.haut.ai/haut.ai/haut.ai-features/consumer-apps/connect-google-analytics-to-your-consumer-app.md).

# Connect Google Analytics to Your Consumer App

How to connect an analytics tracker to a Consumer App so you can collect user analytics from it.

## Analytics options

The Consumer App supports [Google Analytics 4](https://support.google.com/analytics/answer/10089681?hl=en) as a native out-of-the-box analytics integration.

If you want to send Consumer App events to another analytics tool, you can use custom event forwarding from the parent page where the app is embedded. This option requires web development support.

***

## Connecting Google Analytics

{% hint style="warning" %}
Adding an Analytics tracker is a <mark style="color:red;">paid</mark> feature.

To unlock this feature, please contact your Account Manager.
{% endhint %}

You can easily add your [Google Analytics](https://marketingplatform.google.com/about/analytics/) tracking code to any of your Consumer Apps to track visitor behavior and demographics. The Consumer App and Google Analytics integration lets you track when a user started the session, get recommendations, add products to the product cart, and other events.

To set up the integration:

1. On your Google Analytics home page, go to **Admin** settings and select **Data Streams**.
2. Click the **Data Stream** you want to connect to your Consumer App (you might have more than one).
3. Copy the value under **Measurement ID** (you can do this by clicking the **Copy** icon).

   <figure><img src="https://245161714-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MWxBX_zB4FnflOpyBGO%2Fuploads%2F5QiCBbGs2cXR6NmOBsc3%2Fimage.png?alt=media&amp;token=c51cdccf-e945-4e57-ac3c-c0e79acb060f" alt=""><figcaption></figcaption></figure>
4. In your **B2B SaaS account**, go to [**Consumer Apps**](https://saas.haut.ai/app/skin-consultant/dashboard) and open the app you want to integrate with Google Analytics.
5. Go to the **Advanced** tab, scroll down to the **Google Analytics tracker** tab, and paste the previously copied measurement ID into the **tracker ID** field.<br>

   <figure><img src="https://245161714-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MWxBX_zB4FnflOpyBGO%2Fuploads%2F1ju096MxWDVr8IZXlPKo%2Fimage.png?alt=media&amp;token=20ecd037-d40f-43c4-9b44-aa367c8f2a3c" alt=""><figcaption></figcaption></figure>
6. Save the changes.

## Testing integration

To test the integration, we suggest using Google Tag Assistant. It is the easiest and most friendly tool for non-technical users.

1. Copy the link to your Consumer App.
2. Open Google Tag Assistant: <https://tagassistant.google.com/>.
3. Click `Add domain`.

   <figure><img src="https://245161714-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MWxBX_zB4FnflOpyBGO%2Fuploads%2FnRMImSkP0tUIVGwfHGj7%2Fimage.png?alt=media&amp;token=94f136ab-d7c1-4551-9801-afcc716c779d" alt=""><figcaption></figcaption></figure>
4. Paste the copied link to your Consumer App and click Connect.

   <figure><img src="https://245161714-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MWxBX_zB4FnflOpyBGO%2Fuploads%2FDCA0V0OTWMFazjVNkbq9%2Fimage.png?alt=media&amp;token=f0441fbf-d631-4d99-a270-e5566bc04600" alt=""><figcaption></figcaption></figure>
5. Select your measurement ID on the top of the Tag Assistant page.<br>

   <figure><img src="https://245161714-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MWxBX_zB4FnflOpyBGO%2Fuploads%2F5uu3sSCXMUs2QK6HjP9x%2Fimage.png?alt=media&amp;token=73260e40-b474-4521-8647-df7f429062ad" alt=""><figcaption></figcaption></figure>
6. Switch to your skin Consumer App and complete the user journey (e.g., capture the photo, get recommendations, and add products to the cart).
7. Switch back to the Tag Assistant Tab. You should see the events from the Consumer App if everything was set correctly.

   <figure><img src="https://245161714-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MWxBX_zB4FnflOpyBGO%2Fuploads%2F3g35cLj8jyitXHRhZakc%2Fimage.png?alt=media&amp;token=c2a24191-3d5a-4bc2-9dbb-b8d2f874e67d" alt=""><figcaption></figcaption></figure>

## Google Analytics Reference

Use these guides depending on what you want to track or customize:

* [Google Analytics Events Reference](/haut.ai/haut.ai-features/consumer-apps/connect-google-analytics-to-your-consumer-app/google-analytics-events-reference.md) lists the Consumer App events and parameters you can use to build funnels and reports in GA4.
* [Google Analytics Events Reference (SkinGPT)](/haut.ai/haut.ai-features/consumer-apps/connect-google-analytics-to-your-consumer-app/google-analytics-events-reference-skingpt.md) lists the events available for SkinGPT-powered experiences.

## Important to Note

Consumer App sends events to analytics tools only if the user has provided consent inside the Consumer App.

## Add custom UTM-parameters to Your Consumer App

* [Forward Parent Page UTM Parameters to the Consumer App](/haut.ai/haut.ai-features/consumer-apps/connect-google-analytics-to-your-consumer-app/forward-parent-page-utm-parameters.md) explains how to pass campaign UTM parameters from the parent page URL into the embedded app iframe.

## Other options to track

* [Send Consumer App Analytics Events to Third-Party Analytics](/haut.ai/haut.ai-features/consumer-apps/connect-google-analytics-to-your-consumer-app/analytics-event-forwarding-via-postmessage.md) explains how to receive Consumer App analytics events on the parent page and forward them to Google Analytics or another third-party analytics tool.

## Tracked Events

You can use tracked events to build a conversion funnel and understand how your clients interact with the Consumer App. Check the full list of events in [Google Analytics Events Reference](/haut.ai/haut.ai-features/consumer-apps/connect-google-analytics-to-your-consumer-app/google-analytics-events-reference.md).

If you embed the app into a landing page or Shopify page, you can also keep campaign attribution consistent by forwarding parent page UTM parameters into the app iframe. See [Forward Parent Page UTM Parameters to the Consumer App](/haut.ai/haut.ai-features/consumer-apps/connect-google-analytics-to-your-consumer-app/forward-parent-page-utm-parameters.md).

## FAQ

### I attached the Google Analytics, but I don't see any events incoming

It normally takes up to 1 day for Google Analytics to start gathering the events and metrics for the new stream. It might take longer if your Consumer App is not actively used (<10 users per day).

In case you don't see the events for a longer period, please, reach out to your Account Manager.

### Google is moving away from 3rd party cookies. How will it Returning User Experience in the Consumer App?

Consumer App uses a [Configure Advanced Settings](/haut.ai/haut.ai-features/consumer-apps/configure-advanced-settings.md#returning-user-experience)feature to show differences in metrics, and cookies are used to re-identify the same user by device-browser finger print. Haut.AI does not use 3rd party cookies for this or for any other services, so Google moving away from 3rd party cookies does not affect the functionality or accuracy of user identification in the Consumer App.

### Can you integrate other analytics tools? GludoIO / Triple / Facebook Pixel

Google Analytics is supported as a native out-of-the-box integration. Other analytics tools can receive Consumer App events through custom event forwarding from the parent page where the app is embedded. This requires web development support. See [Send Consumer App Analytics Events to Third-Party Analytics](/haut.ai/haut.ai-features/consumer-apps/connect-google-analytics-to-your-consumer-app/analytics-event-forwarding-via-postmessage.md).

***

{% hint style="warning" %}
Not a Haut.AI client yet?
{% endhint %}

<a href="https://haut.ai/book-a-demo?utm_source=referral&#x26;utm_medium=saas_docs&#x26;utm_campaign=Docs_SaaS_HautAI" class="button primary" data-icon="user-vneck">Book a demo</a> <a href="https://haut.ai/product/ai-skin-analysis?utm_source=referral&#x26;utm_medium=saas_docs&#x26;utm_campaign=Docs_SaaS_HautAI" class="button secondary" data-icon="external-link">Platform overview on haut.ai</a>


---

# 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 dynamically by asking a question.

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

```
GET https://docs.saas.haut.ai/haut.ai/haut.ai-features/consumer-apps/connect-google-analytics-to-your-consumer-app.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
