# Google Analytics

If you want to track your website analytics using Google Analytics, continue reading.

{% hint style="info" %}
Note that - Google recently changed the Google Analytics tags. Old tags are called Universal Analytics (typically starts with "UA-") and new tags are called Google Analytics Tags/Measurement Tags (typically stats with "G-" or "M-" or something similar.
{% endhint %}

{% hint style="info" %}
Google usually takes a few minutes before it starts showing the traffic. Please wait for a few minutes after the setup. Alternatively, you can right-click on the webpage and see 'view-source' to verify the the script/Google Analytics Id appears on the webpage 'view-source' code.
{% endhint %}

Get your Google Analytics Id by following the steps here at <https://analyticshelp.io/blog/google-analytics-property-tracking-id/>

#### Once you have the Id, follow below steps.

1. Go to the Google sheet connected to your website
2. Go to 'Other Settings' sheet and give your Google Analytics Id in Column B against 'Google Analytics Id' row.
3. Make sure you use the 'live test' link to pull the latest changes.

![](/files/-MgQdW0eCoKuzuNRf6Cy)

**Alternative way to use Google Analytics**

1. If you have the javascript code to add Google Analytics to your pages, just copy the cod&#x65;**.**
2. Go to the Google sheet connected to your website
3. Go to 'Advanced Settings' sheet and add your copied Google Analytics script in Column B (make sure you don't remove the \<script> tags). In Column A, you can give any text and in Column C, select "Before Header Closed".
4. Make sure you use the 'live test' link to pull the latest changes.

![](/files/-MgQe7SUftMTUEVUYeB_)


---

# 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://help.siteoly.com/integrations/google-analytics.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.
