adobe / adobe/commerce-events

Disabling 3rd party cookies breaks event collection (with experience-platform-connector)

Open
#163 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
10
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Hi everyone, as a precaution we're internally trying to detect the impact of the planned deprecation of 3rd party cookies by major browsers.
[Google shares update on next step toward phasing out third-party cookies in Chrome (blog.google)](https://blog.google/products/chrome/privacy-sandbox-tracking-protection/)
[Saying goodbye to third-party cookies in 2024 | MDN Blog (mozilla.org)](https://developer.mozilla.org/en-US/blog/goodbye-third-party-cookies/)

As per the [Adobe Cookie](https://experienceleague.adobe.com/en/docs/commerce-admin/start/compliance/privacy/compliance-cookie-law#additional-cookies) there are additional cookies in play required for some systems.

Currently the _@adobe/magento-storefront-event-collector_ package (which in itself is a dependency of _@magento/experience-platform-connector_ uses _snowplow_ as a depedency. Which uses 3rd party cookies that when disabled make it so that the flow of event capture is broken.

### Expected Behaviour
Events are captured by the event collector and sent to the edge server edge server collecting them.
### Actual Behaviour
The events are captured by the event collector and are failing to be sent to the edge server collecting them.
### Reproduce Scenario (including but not limited to)
- clone latest version of pwa-studio
- install @magento/experience-platform-connector
- run pwa-studio locally
- disable 3rd party cookies on Firefox or a Chrome-bases browser
- perform any of the documented automatically captured events

#### Steps to Reproduce
- disable 3rd party cookies on Firefox or a Chrome-bases browser
- perform any of the documented automatically captured events

#### Platform and Version
```
pwa-studio
@magento/experience-platform-connector: "^1.0.5"
magento-storefront-event-collector": "1.6.0"
```

#### Sample Code that illustrates the problem
The issue is the [mg](https://github.com/adobe/commerce-events/blob/main/packages/storefront-events-collector/src/snowplow.ts#L24) cookie being set on snowplow.

#### Logs taken while reproducing problem
```
{
"log": {
"version": "1.2",
"creator": {
"name": "Firefox",
"version": "129.0"
},
"browser": {
"name": "Firefox",
"version": "129.0"
},
"pages": [
{
"id": "page_1",
"pageTimings": {
"onContentLoad": 509,
"onLoad": 688
},
"startedDateTime": "2024-08-02T08:42:52.601+01:00",
"title": "REDACTED"
}
],
"entries": [
{
"startedDateTime": "2024-08-02T08:42:52.601+01:00",
"request": {
"bodySize": 0,
"method": "POST",
"url": "https://edge.adobedc.net/ee/v1/interact?configId=32aa7c42-63fb-4d55-b41e-3e5baa73e1ef&requestId=a310b94a-2206-4fed-8e9d-866a83877cbb",
"httpVersion": "",
"headers": [
{
"name": "Host",
"value": "edge.adobedc.net"
},
{
"name": "User-Agent",
"value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:129.0) Gecko/20100101 Firefox/129.0"
},
{
"name": "Accept",
"value": "*/*"
},
{
"name": "Accept-Language",
"value": "en-US,en;q=0.5"
},
{
"name": "Accept-Encoding",
"value": "gzip, deflate, br, zstd"
},
{
"name": "Referer",
"value": "REDACTED"
},
{
"name": "Content-Type",
"value": "text/plain; charset=UTF-8"
},
{
"name": "Content-Length",
"value": "2089"
},
{
"name": "Origin",
"value": "REDACTED"
},
{
"name": "DNT",
"value": "1"
},
{
"name": "Sec-GPC",
"value": "1"
},
{
"name": "Connection",
"value": "keep-alive"
}
],
"cookies": [],
"queryString": [
{
"name": "configId",
"value": "32aa7c42-63fb-4d55-b41e-3e5baa73e1ef"
},
{
"name": "requestId",
"value": "a310b94a-2206-4fed-8e9d-866a83877cbb"
}
],
"headersSize": 0
},
"response": {
"status": 0,
"statusText": "",
"httpVersion": "",
"headers": [],
"cookies": [],
"content": {},
"redirectURL": "",
"headersSize": 0,
"bodySize": -1
},
"cache": {},
"timings": {},
"time": 0,
"pageref": "page_1"
}
]
}
}
```

Contributor guide

Open the contributing guide

Research direction

Start with packages/storefront-events-collector/src/snowplow.ts at line 24, then reproduce the documented event capture flow with third-party cookies disabled in Firefox or a Chrome-based browser. Done means automatically captured events are sent to the Adobe edge server under that configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
analytics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.