> For the complete documentation index, see [llms.txt](https://docs.contextsdk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.contextsdk.com/context-decision/advanced/analytics-and-reporting.md).

# Analytics & Reporting

### Tracking A/B Test Segmentation

Tracking which group a user is assigned to (e.g. Control or Treatment) is important if you want to compare each cohort's performance. This is even more evident for long-term metrics such as LTV and user churn.

To determine which group a user was assigned to, can use the following code:

{% tabs %}
{% tab title="iOS" %}

```swift
let modelInfo = ContextManager.getCustomModel(for: "your_upsell_flow")
let isControl = modelInfo?.isControl ?? true
```

{% endtab %}

{% tab title="Android" %}
Not yet supported in Android. Reach out to our team to request this feature.
{% endtab %}

{% tab title="Flutter" %}
Not yet supported in Flutter. Reach out to our team to request this feature.
{% endtab %}

{% tab title="Unity" %}
Not yet supported in Unity. Reach out to our team to request this feature.
{% endtab %}

{% tab title="React Native" %}
Not yet supported in React Native. Reach out to our team to request this feature.
{% endtab %}
{% endtabs %}

When the model info is `nil`, it means the ML model hasn't been deployed yet (i.e. we're still in calibration phase). When present, a ML model has already been deployed, and we can access the `isControl` property.

### Tracking OTA Model Rollouts

To track which over-the-air model is currently active in the app, ContextDecision exposes a `ContextManager.currentAppliedCustomModelVersion` function. This returns a unique identifier that gets updated every time the app receives a new model version. You can track this in your own analytics to observe model rollouts.

During calibration phase, this function will always return `"calibration"`, and when opting for [custom SDK binaries](/context-decision/advanced/model-distribution-methods.md), it will return the SDK version.


---

# 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.contextsdk.com/context-decision/advanced/analytics-and-reporting.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.
