# analytics domain

## set\_analytics\_enabled

### Stories addressed <a href="#stories-addressed-1" id="stories-addressed-1"></a>

* Enables or disables the use of analytics. The default state of native apps is to have analytics disabled.&#x20;
* Users need to be uniquely identified for analytics purposes. Note that user identifiers must be not represent or be tied to personal information.

#### Treatment of analytics events before set\_analytics\_enabled is called

* Native apps should "queue" analytics events (for example app launch events) for sending and retain them during the current session until `set_analytics_enabled` is called with an `is_enabled` value of `true`, at which point sending the queued analytics events to backend servers is triggered.

### URL <a href="#url-1" id="url-1"></a>

```
liquidstate://analytics/set_analytics_enabled?request=URLENCODED_REQUEST_OBJECT
```

### Request data <a href="#request-data-1" id="request-data-1"></a>

| Property name | Type    | Required | Description                                                                    |
| ------------- | ------- | -------- | ------------------------------------------------------------------------------ |
| is\_enabled   | Boolean | Yes      | Determines whether native apps should initiate analytics event tracking        |
| user\_id      | String  | Yes      | Sets the unique identifier to use for analytics purposes for the current user. |

### Response <a href="#response-data-1" id="response-data-1"></a>

No response, the native app will simply enable or disable the sending of analytics events to backend servers.

## set\_super\_properties

### Stories addressed <a href="#stories-addressed-1" id="stories-addressed-1"></a>

* Set or reset the list of properties that should be automatically added to any analytics event.&#x20;

### URL <a href="#url-1" id="url-1"></a>

```
liquidstate://analytics/set_super_properties?request=URLENCODED_REQUEST_OBJECT
```

### Request data <a href="#request-data-1" id="request-data-1"></a>

| Property name | Type   | Required | Description                            |
| ------------- | ------ | -------- | -------------------------------------- |
| properties    | Object | Yes      | JSON object (pairs of keys and values) |

### Response <a href="#response-data-1" id="response-data-1"></a>

No response, the native app will internally update its list of super properties to be used for future analytics events.

## add\_super\_properties

### Stories addressed <a href="#stories-addressed-1" id="stories-addressed-1"></a>

* Augment the list of properties that should be automatically added to any analytics event.&#x20;

### URL <a href="#url-1" id="url-1"></a>

```
liquidstate://analytics/add_super_properties?request=URLENCODED_REQUEST_OBJECT
```

### Request data <a href="#request-data-1" id="request-data-1"></a>

| Property name | Type   | Required | Description                            |
| ------------- | ------ | -------- | -------------------------------------- |
| properties    | Object | Yes      | JSON object (pairs of keys and values) |

### Response <a href="#response-data-1" id="response-data-1"></a>

No response, the native app will internally update its list of super properties to be used for future analytics events.

## remove\_super\_properties

### Stories addressed <a href="#stories-addressed-1" id="stories-addressed-1"></a>

* Remove the use of some properties that should be automatically added to any analytics event.&#x20;

### URL <a href="#url-1" id="url-1"></a>

```
liquidstate://analytics/remove_super_properties?request=URLENCODED_REQUEST_OBJECT
```

### Request data <a href="#request-data-1" id="request-data-1"></a>

| Property name | Type   | Required | Description                            |
| ------------- | ------ | -------- | -------------------------------------- |
| properties    | Object | Yes      | JSON object (pairs of keys and values) |

### Response <a href="#response-data-1" id="response-data-1"></a>

No response, the native app will internally update its list of super properties to be used for future analytics events.

## post

### Stories addressed <a href="#stories-addressed-1" id="stories-addressed-1"></a>

* Track an analytics event

### URL <a href="#url-1" id="url-1"></a>

```
liquidstate://analytics/post?request=URLENCODED_REQUEST_OBJECT
```

### Request data <a href="#request-data-1" id="request-data-1"></a>

| Property name | Type   | Required | Description                            |
| ------------- | ------ | -------- | -------------------------------------- |
| name          | String | Yes      | The name of the event                  |
| properties    | Object | Yes      | JSON object (pairs of keys and values) |

### Response <a href="#response-data-1" id="response-data-1"></a>

No response, the native app will internally update its list of super properties to be used for future analytics events.


---

# Agent Instructions: 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.liquid-gears.com/iwa-framework/events/analytics-domain.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.
