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

# How app tracking works

The route from the Firebase SDK to the ad platforms, and why app traffic needs its own client and its own tags.

## The route

```
   App (iOS / Android)
   Firebase SDK  ──①──►  GA4 data stream setting  ──②──►  Server container
   (signup, purchase)     (hands the sGTM URL                (tagging.[client].nl)
                           back to the SDK)                   │
                                                    ┌─────────┼──────────┐
                                                    ▼         ▼          ▼
                                               GA4 App    GA4 tag    CAPI tags
                                                client   → property  → Meta / TikTok
```

## The server URL is not in the app

The Firebase SDK reads the server-side GTM URL from the GA4 data stream settings, not from the app code. The app only carries a flag that says server-side upload is allowed. As long as the setting in GA4 is off, the SDK sends straight to GA4 and the server container receives nothing, no matter what the app does.

This is the single most common cause of "no app data arrives", and it is settled in GA4 Admin, per data stream, iOS and Android separately.

## App traffic arrives on its own client

A server container routes an incoming request to the first client that claims it. Firebase requests are claimed by the **GA4 App client** (in GTM: the Google Analytics: GA4 (App) client), which is a different client than the GA4 web client. A container that only has a web client answers Firebase requests with nothing useful, and no tag fires.

Because the client differs, `Client Name` is the one condition that reliably separates app traffic from web traffic inside the container.

## Why every platform needs its own tag

An app event looks different from a web event:

* there are no cookies, so no `fbp`, `fbc`, `ttp` or `gclid`,
* there is no page URL or referrer,
* the platforms require device information instead, and each one wants it in its own shape.

So you cannot point an existing web tag at app traffic and expect it to work. In practice you add, per platform, one tag configured for app events, fired by a trigger that filters on the App client.

{% hint style="warning" %}
A Custom Event trigger that only matches an event name, for example `signup`, matches that event from **every** client, app included. Existing web tags then quietly pick up app traffic and send it as web events. Add `Client Name` to those triggers when a container starts handling app traffic.
{% endhint %}

## What stays the same

The container, the tagging domain, the consent setup and the event naming are shared between web and app. You are adding a second source to an existing container, not building a second container.


---

# 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.adpage.io/app-tracking/how-app-tracking-works.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.
