# How to integrate Google Analytics in cumulocity platform?

**URL:** <https://community.cumulocity.com/t/how-to-integrate-google-analytics-in-cumulocity-platform/942>\
**Category:** Forum\
**Tags:** cumulocity\
**Created:** [March 1, 2023, 11:56am UTC](https://community.cumulocity.com/t/how-to-integrate-google-analytics-in-cumulocity-platform/942 "2023-03-01T11:56:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![at00735427](https://avatars.discourse-cdn.com/v4/letter/a/6a8cbe/32.png) [@at00735427](https://community.cumulocity.com/u/at00735427)\
**Post date:** [March 1, 2023, 11:56am UTC](https://community.cumulocity.com/t/how-to-integrate-google-analytics-in-cumulocity-platform/942/1 "2023-03-01T11:56:18Z")

</div>

#### What product/components do you use and which version/fix level are you on?

10.13

#### Is your question related to the free trial, or to a production (customer) instance?

Production(Customer) instance

#### What are you trying to achieve? Please describe it in detail.

We are trying to integrate google analytics to our cumulocity tenant with metrics related to below points.

- what user are using Cloud
- how many accounts and devices each use
- what applications are being monitored

we have google analytics account and generally we need to add Google code snippet in Head section of Web page.

To achieve above four points we are not sure where to add Google code into our Cumulocity IOT platform.

Any help would be appreciated.

#### Do you get any error messages? Please provide a **full error** message screenshot and log file.

#### Have you installed all the latest fixes for the products and systems you are using?

---

<div class="post-metadata">

**Author:** ![Tristan\_Bastian](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/tristan_bastian/32/18259_2.png) [@Tristan\_Bastian](https://community.cumulocity.com/u/Tristan_Bastian)\
**Post date:** [March 1, 2023, 2:29pm UTC](https://community.cumulocity.com/t/how-to-integrate-google-analytics-in-cumulocity-platform/942/2 "2023-03-01T14:29:02Z")

</div>

Hi,

Regarding `what user are using Cloud`, you would have to build your own versions of the default Cumulocity apps.  
There you could e.g. follow this guide to include Google Analytics in your app:

> **[Angular & Google Analytics - The Complete Guide](https://danielk.tech/home/angular-and-google-analytics)**
>
> If you want to discover how users are interacting with an Angular application then Google Analytics is definitely the cheapest, easiest and quickest way to get started.

This should allow you to track which apps users are using and where they navigate to within the app.

Cumulocity does product experience tracking using Gainsight on trial tenants.  
You might want to override the [GainsightService](https://resources.cumulocity.com/documentation/websdk/ngx-components/injectables/GainsightService.html) to transmit any custom events, that have been implemented, to Google Analytics.

Regarding `how many accounts and devices each use`, as not all users of your tenants would have access to all of the data you would get false values when implementing this via Googles script tag in the web applications. A custom microservice could provide you the correct data here.

Regarding `what applications are being monitored`, I did not actually get what you would like to track here… What is meant with `applications` in this context?

Regards,  
Tristan

---

<div class="post-metadata">

**Author:** ![at00735427](https://avatars.discourse-cdn.com/v4/letter/a/6a8cbe/32.png) [@at00735427](https://community.cumulocity.com/u/at00735427)\
**Post date:** [March 2, 2023, 12:31pm UTC](https://community.cumulocity.com/t/how-to-integrate-google-analytics-in-cumulocity-platform/942/3 "2023-03-02T12:31:30Z")

</div>

Thanks for your reply but my concern is to know how we can add google Analytics in head section of web page in Cumulocity.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [August 29, 2023, 12:32pm UTC](https://community.cumulocity.com/t/how-to-integrate-google-analytics-in-cumulocity-platform/942/4 "2023-08-29T12:32:16Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
