> For the complete documentation index, see [llms.txt](https://integrations.impact.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://integrations.impact.com/integration-guides/for-brands/tracking-integrations/api-online-sale/send-conversions-with-consent-mode.md).

# Send Conversions with Consent Mode

If your site uses Consent Mode, follow these steps when reporting conversions via the API.

1. Include any relevant first-party identifiers. For example, if you specified `CustomProfileId` in the UTT's `identify` call, send the `CustomProfileId` with the conversion event.
2. After the user provides consent, use `generateClickId` to obtain an encoded first-party user identifier on your pages. Send this parameter with the conversion event. Follow step 3 for loyalty or rewards conversions without consent.

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

```javascript
<script>
  ire("generateClickId", function(click_id) {
    console.log(click_id);
  });
</script>
```

{% endtab %}
{% endtabs %}

3. Send all conversion events for users referred by loyalty or rewards partners along with the relevant identifiers, even if the user hasn't provided consent. To identify such conversions, check for the `impact-loyalty` localStorage object, or store an identifier when the user's initial navigation contains the `im_rewards=1` flag in the landing page URL query string.
4. Send all conversion events even when consent is not provided. This is necessary to accurately assess partner referral impact. For non-consented users, exclude personally identifiable information (PII) such as customer IDs, emails, and click IDs from the event data.

Read more about Integrating [Consent Mode](/integration-guides/for-brands/tracking-integrations/integrate-consent-mode-on-impact.com.md) on impact.com.


---

# 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://integrations.impact.com/integration-guides/for-brands/tracking-integrations/api-online-sale/send-conversions-with-consent-mode.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.
