beyonk-group / svelte-google-analytics

Google Analytics component for Svelte
77 stars 12 forks source link

Cookieless tracking #10

Closed tw1t611 closed 2 years ago

tw1t611 commented 3 years ago

Hi, i am trying to setup cookieless tracking with ga4. Here is my config:

    <GoogleAnalytics
      properties={["G-HFPDPNYCZ1"]}
      configurations={{
        "G-HFPDPNYCZ1": {
          client_storage: "none",
          anonymize_ip: true,
          cookie_flags: "samesite=none;secure",
        },
      }}
    />

Somehow cookies are created. Is that a bug, or isn't it possible to disable all cookies? image

samesite=none;secure seems like the http flag, so could it be, that cookies are just not sent, but created?

The goal is to setup analytics without a need for a cookie banner. This might not be related to the project. I would be thankful for any hint though.

antony commented 3 years ago

I'm afraid this extends beyond my knowledge of google analytics, but maybe somebody else can help.

dextermb commented 2 years ago

Based on the article here it seems that you should be passing:

{ client_storage: 'none', anonymize_ip: true }

Feel free to reopen this issue if you are still having issues.