> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.teleporthq.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to add Google Analytics to a project

**Here is how you can add Google Analytics to your TeleportHQ project.**

|    |    |    |
| --- | --- | --- |
| [1. Copy your Google Analytics ID](#2-copy-your-google-analytics-id) | [2. Add the tracking ID to the project](#2-add-the-tracking-id-to-the-project) | [3. Alternative: Adding the Google tag](#2-alternative-adding-the-google-tag) |

## Copy your Google Analytics ID

* **Sign into your Google Analytics account** and go to **Admin**
* In the Admin **Select an account** from the ACCOUNT column
* **Select a property** from the PROPERTY column.

![Google Analytics dashboard](https://storage.crisp.chat/users/helpdesk/website/60c4bca58bb99c00/1-google-analytics_119csaz.png)

* Under the PROPERTY column, **click Tracking Info -> Tracking code**
* **Copy the Tracking ID** at the copy of the page. (It should look something like: UA-000000-2)

You can check out this [link](https://support.google.com/analytics/answer/1008080#zippy=%2Cin-this-article) to find more information about Google Analytics tracking.

![Tracking ID and Google Tag in Analytics dashboard](https://storage.crisp.chat/users/helpdesk/website/60c4bca58bb99c00/2-getting-analytics-token_ligogl.png)

||| Depending on the version you use, the Google Analytics interface may look different.

## Add the tracking ID to the project

To add to your TeleportHQ project:

* Go to **Project settings**, either from the Dashboard or by clicking on the project name in the top bar of the editor
* Open the **Custom Code section**
* Under the **Google -> Analytics** section, paste the **Tracking ID** into the input
* Scroll down and click **Save changes**

![Adding Analytics ID to Project settings](https://storage.crisp.chat/users/helpdesk/website/60c4bca58bb99c00/3-adding-analytics-token_s97r16.png)

## Alternative: Adding the Google tag

A different way to add Google Analytics is to:

* **Copy the Google tag from the Tracking Info** -> Tracking code section in Google Analytics instead of the Tracking ID
* Then, go to TeleportHQ and open the **Project settings -> Custom code** section
* **Paste the Google tag into the <HEAD> section**
* Click **Save changes**.

![Alternative: Adding Google tag to HEAD](https://storage.crisp.chat/users/helpdesk/website/60c4bca58bb99c00/4-alternative_14a43wy.png)