> For the complete documentation index, see [llms.txt](https://docs.edgetag.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.edgetag.io/api/getting-started/implementation/consent.md).

# Consent

Most merchants now have a consent banner on their website. EdgeTag fully supports consent flow both in the browser and on the server. We first verify consent in the browser when the event is triggered, and then on the server as well, to ensure compliance. If your customer is still not using consent, you can skip this step and go to the [channel step](/api/getting-started/implementation/channel.md).

Consent can be set up when you add a website, but it can also be enabled after the fact.&#x20;

The values that are used are:

* DISABLED
* CUSTOM

{% hint style="info" %}
In API documentation, you will see that other values are also possible, but that is used for EdgeTag internal setup, and you will not get automatic support for Shopify consent Privacy API if you select `SHOPIFY`
{% endhint %}

[Tag](/api/api/tag.md#put-tag-tagid)

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

```javascript
fetch('https://api-sandbox.edgetag.io/tag/{tagId}', {
  method: 'PUT',
  headers: {
    'Accept': 'application/json',
    'Authorization': 'Bearer your-token',
    'Team-Id': '{your-team-id}'
  },
  body: JSON.stringify({
    name: 'Domain',
    domain: 'abc.domain.com',
    rootDomain: 'domain.com',
    debug: false,
    currencyConversion: null,
    sameSite: 'LAX',
    managed: true,
    hostId: '',
    allowedEvents: null,
    gpc: false,
    cookieMapKey: '_shopify_y',
    platform: "SHOPIFY",
    idStorageMapping: null,
    consent: 'CUSTOM'
  })
})

```

{% endtab %}

{% tab title="cURL" %}

```bash
curl --request PUT \
  --url https://api-sandbox.edgetag.io/me \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {your-token}' \
  --header 'Content-Type: application/json' \
  --header 'Team-Id: {your-team-id}' \
  --data '{
	"name": "Domain",
	"domain": "abc.domain.com",
	"rootDomain": "domain.com",
	"debug": false,
	"currencyConversion": null,
	"sameSite": "LAX",
	"managed": true,
	"hostId": "",
	"allowedEvents": null,
	"gpc": false,
	"cookieMapKey": "_shopify_y",
	"platform": "SHOPIFY",
	"idStorageMapping": null,
	"consent": "CUSTOM"
}'
```

{% endtab %}
{% endtabs %}

If you don't have tag information, you can also first call the [GET API](/api/api/tag.md#get-tag-tagid) and then update the consent property on the object that is returned.


---

# 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.edgetag.io/api/getting-started/implementation/consent.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.
