# Connect Analytics

## Creating a free google analytics account:

To get started with Google Analytics, you'll need to create a free account. Follow these steps to sign up:

1. Go to the Google Analytics website: <https://analytics.google.com/>.
2. Click on the "Sign in" button in the top-right corner.
3. If you already have a Google account, sign in with your credentials. Otherwise, click on "Create account" to make a new Google account.
4. Follow the prompts to set up your account. Make sure to choose the correct options for your website or app.

## Obtaining your google analytics code:

Once you have your Google Analytics account set up, you need to get the tracking code for your website. The tracking code is a piece of JavaScript that you will need to add to your website's HTML to start tracking visitors and their behavior. Here's how to find your tracking code:

1. After signing in to your Google Analytics account, click on the "Admin" option in the lower-left corner of the page.
2. On this screen there will be a search bar at the top of the page. Start typing "Tracking" into the search bar and your tracking code (or "measurement ID") will show up as a search preview. Copy this code to your clipboard.

{% hint style="info" %}
The Google Analytics tracking code (or measurement ID) will be displayed in the format: `UA-XXXXXXXXX-X`.
{% endhint %}

## Adding analytics to your site:

1. Now that you have your tracking code you can navigate to **Websites > Your Site** via NationBuilders sidebar.&#x20;
2. Navigate to **Site Settings > Analytics Setup**.
3. Paste your tracking code into the "Google analytics code" form field and save the settings. E.g.

<figure><img src="/files/-LjoJ5dGygiP0b0Bccu6" alt="Where to find the analytics setup tab"><figcaption><p>Where to find the analytics setup tab</p></figcaption></figure>


---

# 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.codenation.com/campana/launching-time-to-go-live/connect-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.
