Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(web-analytics): Add site_name in config and $site_name property #916

Closed
wants to merge 2 commits into from

Conversation

robbie-c
Copy link
Member

@robbie-c robbie-c commented Nov 30, 2023

Changes

Add site_name to config, and $site_name property which is sent with this value. See PostHog/posthog#18863 for context

Checklist

@robbie-c robbie-c changed the title Add site_name in config and $site_name property feat(web-analytics): Add site_name in config and $site_name property Nov 30, 2023
Copy link

github-actions bot commented Nov 30, 2023

Size Change: +240 B (0%)

Total Size: 744 kB

Filename Size Change
dist/array.full.js 176 kB +60 B (0%)
dist/array.js 117 kB +60 B (0%)
dist/es.js 117 kB +60 B (0%)
dist/module.js 118 kB +60 B (0%)
ℹ️ View Unchanged
Filename Size
dist/exception-autocapture.js 12 kB
dist/recorder-v2.js 104 kB
dist/recorder.js 58.4 kB
dist/surveys.js 41.5 kB

compressed-size-action

@robbie-c robbie-c marked this pull request as ready for review November 30, 2023 22:09
Copy link
Collaborator

@benjackwhite benjackwhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing wrong with the implementation but this feels like the wrong approach...

We already send a lot of data in default properties all of which we could derive the necessary info from server side instead.

Why don't we just have a place in the UI where you can configure certain events to be attributed with certain sites? It's not far off from what we do with actions.

The big pluses are:

  1. You can configure it remotely (makes working with PostHog easy)
  2. It works retroactively, not just for events that later have that attribute added
  3. We could in theory use it for more things - it can be "site" based for now but essentially you are sort of cohorting events which could be useful in a variety of quick filter ways

@mariusandra
Copy link
Collaborator

I never get tired of linking to this issue, which might be relevant: PostHog/posthog#12181

@robbie-c
Copy link
Member Author

robbie-c commented Dec 1, 2023

I never get tired of linking to this issue, which might be relevant: PostHog/posthog#12181

Hmm - this is a bit of a sidequest. I do like the idea though.

  • You can configure it remotely (makes working with PostHog easy)
  • It works retroactively, not just for events that later have that attribute added

Configuring remotely is nice, it does mean that it's probably more work to configure though.

Will think about this a bit

@benjackwhite
Copy link
Collaborator

  • You can configure it remotely (makes working with PostHog easy)
  • It works retroactively, not just for events that later have that attribute added

Configuring remotely is nice, it does mean that it's probably more work to configure though.

Will think about this a bit

I could be wrong but I think the "more work" part would be on our side but for the user it would actually be "less work" in that they don't need any special client side config (and we don't need to add support for this to all of our SDKs), rather they "only" have to configure something in the app, which we could even auto configure like - "hey we see you have 4 domains, we have automatically created "sites" based on those domains".

Longer term this feels way more powerful than simply adding more and more data to the event payloads.

@robbie-c
Copy link
Member Author

robbie-c commented Dec 7, 2023

Closing this in favour of doing PostHog/posthog#12181

@robbie-c robbie-c closed this Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants