# Google Analytics

### How to find the Google Analytics Profile ID?

Once you log into Google Analytics, you can easily find the Google Analytics Profile ID (view id) if you look at the url and take everything behind the `p` marked in blue below.

![Google Analytics Profile ID](/files/BJUvpp2jFscaEpoN5UqW)

This is the ID of the view and needs to be inputted as the ids in the format `ga:1234567890`, having ga: as a prefix, as per the below.

![ids (view id)](/files/Ms9qIU0qpKP8PoinyOgN)

### Building Google Analytics search queries

To build your data queries, use the by Google provided tool: <https://ga-dev-tools.web.app/dimensions-metrics-explorer/>

### Things to be careful with Google Analytics

Pre-computed metrics can e.g. include deduplication of users to get to unique users for a timeframe. E.g. a comparison of the last seven days total users vs. daily users per each day individually and then summed up, yields different results. The reason is that a user who visits the page every day will be counted once in the first instance and seven times in the second one.

To avoid this, the time granularity should be the same to the data being displayed.


---

# 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://docs.locoia.com/connectors/connectors/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.
