Skip to content

Commit

Permalink
feat: native cookie support
Browse files Browse the repository at this point in the history
  • Loading branch information
SachaMorard committed Feb 12, 2025
1 parent 1907f8c commit c2d42c0
Show file tree
Hide file tree
Showing 22 changed files with 671 additions and 450 deletions.
42 changes: 39 additions & 3 deletions components/data-collection/amplitude.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ Here's how Edgee events map to Amplitude events:
3. Enter your Amplitude `API Key` and click Save. <br />
_(Your API Key can be found in the [Amplitude Dashboard](https://app.amplitude.com/analytics/assembly-sh/settings/projects)
under Settings > Organization Settings > Project Settings > General > API Keys)_
4. Once the component has been configured, you are ready to send analysis events to Amplitude.
4. Choose how Amplitude native cookies are handled. Turn them off completely, enable them always, or only enable them when user consent is granted.
5. Once the component has been configured, you are ready to send analysis events to Amplitude.

## Destination Name
## Component Name

When configuring the destination in your **Edgee Data Layer** or within SDK calls, use `edgee/amplitude` as the component name:
When configuring the component in your **Edgee Data Layer** or within SDK calls, use `edgee/amplitude` as the component name:

```json
{
Expand All @@ -54,5 +55,40 @@ When configuring the destination in your **Edgee Data Layer** or within SDK call
}
```

## Native Cookie Support

Amplitude uses a device ID cookie (`AMP_[API_KEY]`) to track users across sessions. With Edgee's Native Cookie Support,
this cookie can be managed directly at the edge.

To know more about the native cookie support, please refer to the [Native Cookie Support](/services/data-collection/native-cookie-support) documentation.

### Configuration

In your Amplitude component settings, configure the native cookie support:

<Frame caption="Go to your project > Data Collection > Your Amplitude component">
<img className="block dark:hidden" src="/images/native-cookie-support-light.png"/>
<img className="hidden dark:block" src="/images/native-cookie-support-dark.png"/>
</Frame>

The setting determines when the Amplitude device ID cookie is set:

- **disabled**: Don't manage cookies at the edge (default)
- **safe**: Only set cookie after user grants consent
- **strong**: Set cookie unless user explicitly denies consent
- **always**: Set cookie regardless of consent status

<Warning>
Using `strong` or `always` modes may not comply with privacy regulations in your jurisdiction (such as GDPR, CCPA, or other applicable laws).
By enabling these modes, you assume full responsibility for:
- Ensuring compliance with all applicable privacy laws and regulations
- Obtaining and managing necessary user consents
- Implementing appropriate privacy notices and policies
- Any legal consequences resulting from non-compliant cookie usage

Edgee provides these features as technical capabilities only. We strongly recommend consulting with your legal team or privacy experts before implementing these modes.
</Warning>


For more details on Amplitude implementation, refer to the
[official Amplitude documentation](https://www.docs.developers.amplitude.com/).
38 changes: 36 additions & 2 deletions components/data-collection/google-analytics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ Here's how Edgee events map to Google Analytics events:
_(To create a new API Secret, navigate in the Google Analytics UI to Admin > Data Streams > choose your stream > Measurement Protocol > Create)_
4. You can now start sending events to Google Analytics.

## Destination Name
## Component Name

When specifying the destination in the **Edgee Data Layer** or using SDK methods, please use `edgee/google-analytics` as the component name:
When specifying the component in the **Edgee Data Layer** or using SDK methods, please use `edgee/google-analytics` as the component name:

```json
{
Expand Down Expand Up @@ -282,3 +282,37 @@ Remember to:

For more details on GA4 ecommerce implementation, refer to the
[official Google Analytics documentation](https://developers.google.com/analytics/devguides/collection/ga4/ecommerce).

## Native Cookie Support

Google Analytics uses a client ID cookie (`_ga`) to track users across sessions. With Edgee's Native Cookie Support,
this cookie can be managed directly at the edge.

To know more about the native cookie support, please refer to the [Native Cookie Support](/services/data-collection/native-cookie-support) documentation.

### Configuration

In your Google Analytics component settings, configure the native cookie support:

<Frame caption="Go to your project > Data Collection > Your Google Analytics component">
<img className="block dark:hidden" src="/images/native-cookie-support-light.png"/>
<img className="hidden dark:block" src="/images/native-cookie-support-dark.png"/>
</Frame>

The setting determines when the Google Analytics client ID cookie is set:

- **disabled**: Don't manage cookies at the edge (default)
- **safe**: Only set cookie after user grants consent
- **strong**: Set cookie unless user explicitly denies consent
- **always**: Set cookie regardless of consent status

<Warning>
Using `strong` or `always` modes may not comply with privacy regulations in your jurisdiction (such as GDPR, CCPA, or other applicable laws).
By enabling these modes, you assume full responsibility for:
- Ensuring compliance with all applicable privacy laws and regulations
- Obtaining and managing necessary user consents
- Implementing appropriate privacy notices and policies
- Any legal consequences resulting from non-compliant cookie usage

Edgee provides these features as technical capabilities only. We strongly recommend consulting with your legal team or privacy experts before implementing these modes.
</Warning>
4 changes: 2 additions & 2 deletions components/data-collection/linkedin-capi.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ When you make a `user` call, Edgee stores the user's data (user_id, anonymous_id

To know how to get your access token , visit the [LinkedIn Marketing API documentation](https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/conversions-api).

## Destination name
## Component Name

When configuring the destination in your **Edgee Data Layer** or within SDK calls, use `linkedin_capi` as the component name:
When configuring the component in your **Edgee Data Layer** or within SDK calls, use `linkedin_capi` as the component name:

```json
{
Expand Down
4 changes: 2 additions & 2 deletions components/data-collection/meta-capi.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ When you make a `user` call, Edgee stores the user's data (user_id, anonymous_id

To know how to get your access token and pixel ID, visit the [Meta Marketing API documentation](https://developers.facebook.com/docs/marketing-api/conversions-api/get-started).

## Destination name
## Component Name

When configuring the destination in your **Edgee Data Layer** or within SDK calls, use `edgee/meta-capi` as the component name:
When configuring the component in your **Edgee Data Layer** or within SDK calls, use `edgee/meta-capi` as the component name:

```json
{
Expand Down
59 changes: 58 additions & 1 deletion components/data-collection/piano-analytics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,62 @@ For correctly routing events in your **Edgee Data Layer** or via SDK function ca
```


## Native Cookie Support

Piano Analytics uses various cookies to track users across sessions. With Edgee's Native Cookie Support,
these cookies can be managed directly at the edge.

To know more about the native cookie support, please refer to the [Native Cookie Support](/services/data-collection/native-cookie-support) documentation.

### Configuration

In your Piano Analytics component settings, configure the native cookie support:

<Frame caption="Go to your project > Data Collection > Your Piano Analytics component">
<img className="block dark:hidden" src="/images/native-cookie-support-light.png"/>
<img className="hidden dark:block" src="/images/native-cookie-support-dark.png"/>
</Frame>

The setting determines when the Piano Analytics cookies are set:

- **disabled**: Don't manage cookies at the edge (default)
- **safe**: Only set cookie after user grants consent
- **strong**: Set cookie unless user explicitly denies consent
- **always**: Set cookie regardless of consent status

<Warning>
Using `strong` or `always` modes may not comply with privacy regulations in your jurisdiction (such as GDPR, CCPA, or other applicable laws).
By enabling these modes, you assume full responsibility for:
- Ensuring compliance with all applicable privacy laws and regulations
- Obtaining and managing necessary user consents
- Implementing appropriate privacy notices and policies
- Any legal consequences resulting from non-compliant cookie usage

Edgee provides these features as technical capabilities only. We strongly recommend consulting with your legal team or privacy experts before implementing these modes.
</Warning>

Additionally, you need to select which cookie type to use:

<Frame>
<img className="block dark:hidden" src="/images/piano-cookie-type-light.png"/>
<img className="hidden dark:block" src="/images/piano-cookie-type-dark.png"/>
</Frame>

- **_pcid**: Piano client side cookie with browser ID (recommended for most use cases)
- **_pcid + _pprv**: Piano client side cookie with browser ID and privacy settings
- **atid**: Simple UUID cookie
- **atuserid**: Legacy AT Internet cookie

Then, you can specify the domain of the cookie (optional):

<Frame>
<img className="block dark:hidden" src="/images/piano-cookie-domain-light.png"/>
<img className="hidden dark:block" src="/images/piano-cookie-domain-dark.png"/>
</Frame>

<Note>
If you have any doubts about which cookie type to use or the domain of the cookie, please contact us at [support@edgee.com](mailto:support@edgee.com).
</Note>

For more details on Piano Analytics implementation, refer to the
[official Piano Analytics documentation](https://developers.atinternet-solutions.com/piano-analytics/data-collection/how-to-send-events/collection-api).
[official Piano Analytics documentation](https://developers.atinternet-solutions.com/piano-analytics/data-collection/how-to-send-events/collection-api).
4 changes: 2 additions & 2 deletions components/data-collection/snapchat-capi.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ When you make a `user` call, Edgee stores the user's data (user_id, anonymous_id

To know how to get your access token and pixel ID, visit the [Snapchat Marketing API documentation](https://developers.snap.com/api/marketing-api/Conversions-API).

## Destination name
## Component Name

When configuring the destination in your **Edgee Data Layer** or within SDK calls, use `snapchat_capi` as the component name:
When configuring the component in your **Edgee Data Layer** or within SDK calls, use `snapchat_capi` as the component name:

```json
{
Expand Down
Loading

0 comments on commit c2d42c0

Please sign in to comment.