> 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/preparation-and-roles.md).

# Preparation and roles

What must exist before you start, who owns which part, and the two decisions to take with the app developer up front.

## Prerequisites

* [ ] The app is linked to a **Firebase project**, for iOS and Android.
* [ ] The **GA4 property** has one **app data stream per platform**.
* [ ] A **server container** runs on the client's tagging domain.
* [ ] You have access to Firebase, to GA4 Admin with edit rights, and to the ad accounts you will verify in.
* [ ] The events and their names are agreed, and written down in one shared list.
* [ ] In-app consent is arranged. Website cookie consent does not cover an app.

## Who does what

| Work item                                    | Client | App developer |     AdPage    |
| -------------------------------------------- | :----: | :-----------: | :-----------: |
| Firebase SDK and the sGTM upload flags       |        |       ●       |    Advisory   |
| Ownership of Firebase and GA4                |    ●   |               |               |
| Enabling the sGTM URL per data stream in GA4 |    ●   |               |    Guidance   |
| App client, tags, triggers and publishing    |        |               |       ●       |
| Event names and parameters                   |    ●   |       ●       |    Advisory   |
| Sending an identifier with the event         |        |       ●       | Specification |
| In-app consent                               |    ●   |       ●       |    Advisory   |
| Testing and verification                     |    ●   |               |       ●       |

{% hint style="warning" %}
Confirm ownership before anything else. An external app developer often implements Firebase while the client owns the GA4 configuration, and neither assumes the other is waiting. Most delays in app projects come from this, not from the technical work.
{% endhint %}

## Two decisions to take up front

**1. Which identifier does the app send with a conversion?** App events have no cookies, so the ad platforms need something else to attribute them. Settle this before the app build, because adding it afterwards means a new app release. See **Identifiers and consent in apps**.

**2. Which platforms does the client actually need app conversions in?** GA4, Meta and TikTok can receive app events from the server container. Google Ads works differently and normally does not get a tag at all. Setting that expectation early saves a discussion later.

## What the app needs

* The Firebase Analytics SDK, on both platforms.
* The server-side upload flag:
  * iOS: `GOOGLE_ANALYTICS_SGTM_UPLOAD_ENABLED = true`
  * Android: `<meta-data android:name="google_analytics_sgtm_upload_enabled" android:value="true" />`
* Optionally a preview URL scheme, `tagmanager.sgtm.c.[bundle-id]`, which affects GTM preview only.
* The agreed identifier and any extra event parameters.

The tagging URL itself does **not** belong in `app.json`, `Info.plist` or the Android manifest.


---

# 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/preparation-and-roles.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.
