posthog-js icon indicating copy to clipboard operation
posthog-js copied to clipboard

feat: Add captureStateless function

Open benjackwhite opened this issue 1 year ago â€ĸ 11 comments

Changes

Potential solution for second part of https://github.com/PostHog/posthog-js/issues/1172

...

Checklist

  • [ ] Tests for new code (see advice on the tests we use)
  • [ ] Accounted for the impact of any changes across different browsers
  • [ ] Accounted for backwards compatibility of any changes (no breaking changes in posthog-js!)

benjackwhite avatar May 08 '24 10:05 benjackwhite

The latest updates on your projects. Learn more about Vercel for Git â†—ī¸Ž

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Jun 13, 2024 10:26am

vercel[bot] avatar May 08 '24 10:05 vercel[bot]

Hey @benjackwhite! 👋 This pull request seems to contain no description. Please add useful context, rationale, and/or any other information that will help make sense of this change now and in the distant Mars-based future.

posthog-bot avatar May 08 '24 10:05 posthog-bot

Size Change: +4.45 kB (+0.44%)

Total Size: 1.01 MB

Filename Size Change
dist/array.full.js 239 kB +1.12 kB (+0.47%)
dist/array.js 137 kB +1.11 kB (+0.82%)
dist/es.js 137 kB +1.11 kB (+0.82%)
dist/module.js 137 kB +1.11 kB (+0.82%)
â„šī¸ View Unchanged
Filename Size
dist/exception-autocapture.js 12.2 kB
dist/recorder-v2.js 108 kB
dist/recorder.js 108 kB
dist/surveys-module-previews.js 59.3 kB
dist/surveys.js 60.9 kB
dist/tracing-headers.js 8.26 kB

compressed-size-action

github-actions[bot] avatar May 08 '24 10:05 github-actions[bot]

@benjackwhite looking at the current API surface it should do the job 👍
I assume one will need to enable send_instantly, at least if user didn't opt-in (as in such case queue is not started).

panrafal avatar May 08 '24 17:05 panrafal

@benjackwhite looking at the current API surface it should do the job 👍 I assume one will need to enable send_instantly, at least if user didn't opt-in (as in such case queue is not started).

Hmmm so the intention indeed, wasn't to bypass the opt out functionality... I think we could consider adding an option for that though

benjackwhite avatar May 09 '24 12:05 benjackwhite

Hmmm so the intention indeed, wasn't to bypass the opt out functionality... I think we could consider adding an option for that though

My thinking here is, that people opt out of tracking - they don't want your analytics to be associated with them. The stateless capture enables you to do the same as you already can do on the backend anyway - to count the number of events happening, and my understanding is that it's perfectly fine under every privacy law. At least as long as don't track any user-specific data - probably as a user of this API I should remove the IP, user-agent string and screen dimensions as they can be used for fingerprinting.

panrafal avatar May 09 '24 12:05 panrafal

@benjackwhite any idea how long it can take for such change to be released (a very rough estimate)? I would love to decide if I should hold on and wait, or proceed with the current one and then refactor once it lands.

panrafal avatar May 09 '24 12:05 panrafal

@benjackwhite any idea how long it can take for such change to be released (a very rough estimate)? I would love to decide if I should hold on and wait, or proceed with the current one and then refactor once it lands.

Can't really promise anything. Given other higher priority things I wouldn't put money on this being in in the next week...

benjackwhite avatar May 09 '24 14:05 benjackwhite

@benjackwhite Still I'm amazed you jumped so quickly into such a "fringe" idea! â¤ī¸

panrafal avatar May 09 '24 16:05 panrafal

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

posthog-bot avatar May 17 '24 09:05 posthog-bot

I'd love to keep it open and still very interested in this!

panrafal avatar May 17 '24 09:05 panrafal

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

posthog-bot avatar May 27 '24 09:05 posthog-bot

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

posthog-bot avatar Jun 05 '24 09:06 posthog-bot

This PR was closed due to lack of activity. Feel free to reopen if it's still relevant.

posthog-bot avatar Jun 13 '24 09:06 posthog-bot

Hey @benjackwhite any chance to reopen this?

panrafal avatar Jun 13 '24 09:06 panrafal

Re-opened. This was blocked by some issues with the gdpr-tooling which I fixed in another branch. Will try and have another look at it

benjackwhite avatar Jun 13 '24 09:06 benjackwhite

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

posthog-bot avatar Jun 24 '24 09:06 posthog-bot

This PR was closed due to lack of activity. Feel free to reopen if it's still relevant.

posthog-bot avatar Jul 01 '24 09:07 posthog-bot

It's definitely still relevant :)

panrafal avatar Jul 01 '24 09:07 panrafal