> For the complete documentation index, see [llms.txt](https://docs.edgetag.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.edgetag.io/channels/google-analytics-4.md).

# Google Analytics 4

Google Analytics 4 integration helps connect your Google Analytics property to your website using Google Tag Manager. We manage browser event streaming for you, enabling seamless tracking of user interactions and conversions. The integration provides a straightforward setup with simple configuration options to get you started quickly.&#x20;

{% hint style="info" %}
We recommend setting up a new GA4 property for EdgeTag at the start and configuring it in the EdgeTag dashboard once the data appears to be accurate. We will move to the main property.&#x20;
{% endhint %}

### Details

Channel name: googleAnalytics4

NPM package: [@blotoutio/providers-google-analytics-4-sdk](https://www.npmjs.com/package/@blotoutio/providers-google-analytics-4-sdk)

### Event Flow

Our Google Analytics integration by default focuses exclusively on browser-side event tracking. When enabled, we automatically inject the Google Tag Snippets and handle sending events to Google Analytics.

{% hint style="info" %}
We also support server-side integration, allowing you to track events only from the server side. Please reach out to us, and we can update the configuration.
{% endhint %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.edgetag.io/channels/google-analytics-4.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
