> For the complete documentation index, see [llms.txt](https://docs.didomi.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.didomi.io/analytics/consent-management-platform-cmp-analytics/introduction/custom-behavior-impact-on-cmp-analytics.md).

# Custom behavior impact on CMP analytics

Whether your organization chooses to use functions included in the Didomi SDKs or display a fully customized consent notice, customizing custom notice behavior will likely impact the standard CMP analytics available to your organization.

The most common behavior implemented by organizations that will impact CMP analytics are  functions that either use the API to programatically set the end-user's consent status or sharing consent with a webview. Depending on the functions used, the end-user's consent choice (opt-in or opt-out) will be record as either:

* [external](#external)
* [webview](#webview)

***

### external

If your organization leverages the Didomi API to set the end-user's consent then the end-user's consent choice (opt-in or opt out) will programmatically include an `external` flag and be record as an external opt-in or external opt-out in your organization's CMP analytics.&#x20;

The common API functions that will trigger the `external` flag include:

* [`setCurrentUserStatus`](https://developers.didomi.io/cmp/web-sdk/reference/api#setcurrentuserstatus-parameters)
* [`setUserAgreeToAll`](https://developers.didomi.io/cmp/web-sdk/reference/api#setuseragreetoall)
* [`setUserDisagreeToAll`](https://developers.didomi.io/cmp/web-sdk/reference/api#setuserdisagreetoall)

{% hint style="warning" %}
**Note**: Consent choices that are flagged as external (e.g. external opt-in, external opt-out) are not included in the calculation for opt-in rates and opt-out rates. In order to retrieve this aggregrated data, your organization can utilize the Didomi [Analytics Data Export](https://docs.didomi.io/integrations/analytics-integrations/analytics-data-export.md) premium feature  to compute rates on your end.
{% endhint %}

### webview

An end-user's consent choices (opt-in or opt out) will programmatically include a  `webview` flag and be recorded as an webview opt-in or webview opt-out if your organization performs one of the following customizations:

{% tabs %}
{% tab title="Mobile SDK" %}
Your organization shares consent from an app to a webview and utilizes the [`getJavaScriptForWebView`](https://developers.didomi.io/cmp/mobile-sdk/share-consent-with-webviews#webviews-android-and-ios) function.
{% endtab %}

{% tab title="Web SDK" %}
Your organization leverages the Didomi API to set the end-user's consent by passing `webview` as an action parameter when calling functions such as:&#x20;

* [`setCurrentUserStatus`](https://developers.didomi.io/cmp/web-sdk/reference/api#setcurrentuserstatus-parameters)
* [`setUserAgreeToAll`](https://developers.didomi.io/cmp/web-sdk/reference/api#setuseragreetoall)
* [`setUserDisagreeToAll`](https://developers.didomi.io/cmp/web-sdk/reference/api#setuserdisagreetoall)
  {% endtab %}
  {% endtabs %}

{% hint style="warning" %}
**Note**: Consent choices that are flagged as webview (e.g. webview opt-in, webview opt-out) are available in the [App Sessions dashboard](https://docs.didomi.io/analytics/consent-management-platform-cmp-analytics/cmp-dashboards/app-sessions-dashboard.md) but are not included in the calculation for opt-in rates and opt-out rates. In order to retrieve this aggregrated data, your organization can utilize the Didomi [Analytics Data Export](https://docs.didomi.io/integrations/analytics-integrations/analytics-data-export.md) premium feature  to compute rates on your end.
{% endhint %}


---

# 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.didomi.io/analytics/consent-management-platform-cmp-analytics/introduction/custom-behavior-impact-on-cmp-analytics.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.
