# Segment Sharing

Adnuntius user segments can be shared between different sites. This means, for example, that an advertiser may build a segment based upon their own third-party data and use that segment to target a user on a publisher's site. Segment sharing is designed to work without third-party cookies, and is only allowed when a user has explicitly consented to share their data.

## Requirements

The following two requirements must be met before a segment can be shared:

### User Consent

User consent to shared data is recorded in a consent string. This consent string may be stored in a cookie and automatically sent with each request, or it may be provided as a parameter in the Adnuntius tag.

### Matched User Identifier

Segments are shared when user records in Adnuntius can be matched to the same person. This matching requires a shared user identifier, such as an email address or phone number, is added to both of the user profiles. A common scenario would be when a user has created an account on two different sites.

## Consent String Format

The consent string has a very simple format: it is the folder tags appended together with a `g` character delimiting each folder.

An example string, recording that a user consents to share data with folder `2fe5a` and `ee765` would be:

```
2fe5agee765
```

Any leading `0`s can be ignored, so a consent string for folder `00000000000023fd4` and `000000000000ab3c7` could be written as either:

```
00000000000023fd4g000000000000ab3c7
```

or

```
23fd4gab3c7
```

The consent string can be stored in a cookie named `adnconsent` and this will automatically be used in all requests via the Adnuntius tag. Otherwise, the consent string can be provided in the Adnuntius tag using the `adnConsent` parameter.


---

# 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.adnuntius.com/adnuntius-data/segment-sharing.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.
