> For the complete documentation index, see [llms.txt](https://docs.guideflow.com/help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.guideflow.com/help/integrations/analytics-integrations/google-analytics-integration/ga4-backend-tracking.md).

# GA4 - Backend Tracking

Send Guideflow demo events directly to your GA4 account via Guideflow's backend integration. This method is not impacted by ad blockers and ensures critical events are always captured accurately.

(e.g. track when a prospect completes your demo or submits a lead form, without any data loss from ad blockers)

{% @guideflow/guideflow-embed requestedUrl="<https://app.guideflow.com/embed/5pv2nzuwkn>" %}

### How to connect:

* Navigate to Integrations in your Guideflow dashboard.
* Under Analytics, select Google Analytics and click Connect.
* In Google Analytics, go to Settings → Property Settings → Data Streams, then open your web stream to copy the Measurement ID.
* Paste the Measurement ID into Guideflow's Google Analytics integration settings.
* In Google Analytics, go to Measurement Protocol API Secrets and copy the API Secret.
* Paste the API Secret into the integration settings.
* Select the events you want to track (see table below).
* Toggle on Install for all Guideflows to apply the integration across your entire workspace, or configure it for specific Guideflows.

### Events Tracked

| Event                 | Description                                                        |
| --------------------- | ------------------------------------------------------------------ |
| First Interaction     | The first time a user interacts with the Guideflow                 |
| Create New Lead       | Triggered when a new lead is created                               |
| Step Viewed           | Triggered after a step is visited                                  |
| External Link Clicked | Triggered when a user clicks a link leading to an external website |
| Completed             | Triggered when a user completes the Guideflow                      |
| Session Ended         | Triggered when a user closes the Guideflow tab                     |

### **Testing your Integration:**

* Interact with a Guideflow after setup.
* In Google Analytics, go to Reports → Realtime to verify that Guideflow events are appearing.

{% hint style="info" %}
Google Analytics can take 24 to 48 hours to fully process data. Use the Realtime report to verify the integration is working immediately after setup.
{% 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.guideflow.com/help/integrations/analytics-integrations/google-analytics-integration/ga4-backend-tracking.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.
