> For the complete documentation index, see [llms.txt](https://docs.realmacsoftware.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.realmacsoftware.com/classic/user-manual/how-to/add-google-analytics.md).

# Add Google Analytics

How to track site visitors with Google Analytics in RapidWeaver

This will guide you through adding Google Analytics to your website.

Please remember you'll need to publish your website online and visit your site before you'll see any tracked visitors in the Google Analytics Dashboard.

### Adding Google Analytics to your RapidWeaver Project

Log into Google and go to the Stream details for your website property. You'll want to copy the code under Tagging Instructions > Add a new on-page tag.

![Stream Details for a site property on Google Analytics](https://3941723260-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQxK7JyV6iH6ddgHOOt8v%2Fuploads%2FY4AhVWaz9iWKG3cKbVZu%2FCleanShot%202022-06-02%20at%201.09.47%402x.png?alt=media\&token=4e8ca61f-3818-49f6-a57f-c90be4a71f79)

Once you have copied the code, you'll need to add it to the header area on your website. To do this go to Settings > Code > Head and paste it in. See below for an example of how this should look.

![Example of Google Analytics Code inside of a RapidWeaver Website.](https://3941723260-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQxK7JyV6iH6ddgHOOt8v%2Fuploads%2F4z0f7asXh66Yh7UKznZY%2FCleanShot%202022-05-24%20at%207.03.37%402x.png?alt=media\&token=3633429c-31a6-435e-8110-c73fec191179)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.realmacsoftware.com/classic/user-manual/how-to/add-google-analytics.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
