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

# Google Analytics 4

GA4 is the most commonly-connected source in SMAQ — it grounds nearly every cross-channel analysis.

### What SMAQ pulls

* Sessions, users, conversion events
* Channel/source/medium attribution
* Ecommerce events (item views, add-to-cart, purchases, refunds)
* Landing pages, devices, geography
* Custom dimensions and metrics you've defined in GA4

### What you'll need

* A Google account with **at least Viewer access** on the GA4 property you want to connect.
* The GA4 property ID (auto-detected during the flow).

### Steps to connect

1. In your project, click **Data Source → Add data source**.
2. Pick **Google Analytics 4**.
3. Click **Connect to a new Gmail account** (or pick an already-authorized account if you've connected another Google product before).
4. Grant SMAQ the requested read-only scopes — only the analytics scope is requested.
5. Pick the GA4 property from the dropdown.
6. Name the connection (e.g. "Acme Co - GA4") and optionally click **Test connection**.
7. Click **Connect**.

> **\[Screen video needed]** Full GA4 OAuth flow from "Connect to new Gmail account" through property selection to a successful connection. \~60 seconds.

> **\[Screenshot needed]** Property selection step showing one or more GA4 properties listed.

### After connecting

* SMAQ surfaces dozens of **global datablocks** ready to use immediately — ecommerce overview, channel mix, conversion funnel, landing page performance, etc.
* If your GA4 has ecommerce events enabled, the **Ecommerce Product Opportunity** automation becomes available in the Daily Brief.
* If GA4 is your only connection, the [Onboarding wizard audit](/documentation/get-started/quick-start/onboarding-wizard.md) runs the GA4 audit by default — broken tracking, mobile gaps, unattributed traffic.

### Tips

* **Pick the right property.** Many businesses have a "test" property alongside the production one. Confirm the property ID in your GA4 admin if you're unsure.
* **Ecommerce events**: make sure your site is firing the standard ecommerce events (`view_item`, `add_to_cart`, `purchase`). Without them, ecommerce datablocks return zeros.
* **Custom dimensions**: SMAQ picks up custom dimensions automatically, but they need to be **active** in GA4 (Admin → Custom definitions).

### Troubleshooting

* **"No properties found"** — the Google account you signed in with doesn't have Viewer access on any GA4 property. Add yourself in GA4 Admin → Property Access Management.
* **Data ends at a certain date** — GA4 has a 14-month historical retention by default. Check Admin → Data Retention.
* **Numbers don't match GA4 UI** — confirm date range, timezone, and any filters (sampling, identity space — Device/User). SMAQ uses unsampled Reporting API where possible.

### Related

* [Build your first dashboard](/documentation/get-started/tutorials/build-your-first-dashboard.md) — the tutorial uses GA4 as one source.
* [Run your first automation](/documentation/get-started/tutorials/run-your-first-automation.md) — Daily Brief depends on GA4 for ecommerce signals.


---

# 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:

```
GET https://docs.smaq.io/documentation/connections/ga4.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.
