adobe / commerce-events

MIT License
6 stars 5 forks source link

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

Open seppulcro opened 3 months ago

seppulcro commented 3 months ago

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) Saying goodbye to third-party cookies in 2024 | MDN Blog (mozilla.org)

As per the Adobe Cookie 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)

Steps to Reproduce

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 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"
      }
    ]
  }
}
shiftedreality commented 2 months ago

Hello @seppulcro,

Thank you for submitting this. I've created an internal ticket MSRCH-4682 to review this request.