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

chore(experiments): Add tests for funnel attribution options #27752

Merged
merged 4 commits into from
Jan 22, 2025

Conversation

danielbachhuber
Copy link
Contributor

@danielbachhuber danielbachhuber commented Jan 21, 2025

See #27009
I learned a couple things about attribution behavior: PostHog/posthog.com#10412

Changes

Adds tests for the different attribution types:

CleanShot 2025-01-21 at 13 20 46@2x

How did you test this code?

Tests should pass.

@danielbachhuber danielbachhuber requested a review from a team January 21, 2025 23:09
@danielbachhuber danielbachhuber marked this pull request as ready for review January 21, 2025 23:10
@danielbachhuber danielbachhuber enabled auto-merge (squash) January 21, 2025 23:52
Copy link
Contributor

@andehen andehen left a comment

Choose a reason for hiding this comment

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

Thanks for adding some tests for this and improve the docs! 🙌

Just to understand how "All steps" behaves [docs example]: When there is no breakdown on browser, will the user be counted once or twice then?

@danielbachhuber danielbachhuber merged commit e41db28 into master Jan 22, 2025
98 checks passed
@danielbachhuber danielbachhuber deleted the experiments/funnel-attribution-tests branch January 22, 2025 12:53
@danielbachhuber
Copy link
Contributor Author

Just to understand how "All steps" behaves [docs example]: When there is no breakdown on browser, will the user be counted once or twice then?

@andehen I'm not sure I understand your question 100%. Can you clarify further?

@andehen
Copy link
Contributor

andehen commented Jan 22, 2025

Just to understand how "All steps" behaves [docs example]: When there is no breakdown on browser, will the user be counted once or twice then?

@andehen I'm not sure I understand your question 100%. Can you clarify further?

Take the used example for a single user:

1. `$pageview` with `browser = Chrome`
2. `$pageview` with `browser = Firefox`
3. `user signed up` with `browser = Chrome`
4. `user posted` with `browser = Chrome`
5. `user posted` with `browser = Firefox`

when using "All steps", and no breakdown, I was wondering how it would be counted then. But I think I realize now, that the "Attribution type" is really only relevant when using a breakdown? So it will only be counted once then, given that it's aggregated by "Unique users", right?

@danielbachhuber
Copy link
Contributor Author

But I think I realize now, that the "Attribution type" is really only relevant when using a breakdown? So it will only be counted once then, given that it's aggregated by "Unique users", right?

@andehen Correct. "Attribution type" is actually BreakdownAttributionType under the hood.

fuziontech added a commit that referenced this pull request Jan 22, 2025
* master: (103 commits)
  feat(postgres-estimated-rows): pg Estimated Rows on Data Warehouse Sync (#27634)
  fix: revert darkmode class toggle, updated content on fills (#27783)
  chore: upgrade posthog-js (#27790)
  chore(editor-3001): add back join actions (#27740)
  feat: Add person distinct ID overrides squash job (as dagster job) (#27710)
  fix(created-by-sources): Adding `created_by` to sources (#27751)
  Revert "feat(data-warehouse): V2 pipeline release " (#27791)
  fix: typo for feature flags (#27786)
  fix(defer-unmounting): Defer unmounting of react elements (#27742)
  feat(data-warehouse): V2 pipeline release (#27732)
  fix(data-warehouse): Ensure dates are actual datetime formats (#27777)
  fix: enable hot reload for the products dir (#27746)
  fix: assignee selector when null (#27737)
  chore: clarify rrweb imports (#27776)
  chore(deps): Update posthog-js to 1.207.3 (#27779)
  feat(retention): filters on start/return event (#27770)
  fix(experiments): only show supported math functions (#27589)
  feat(web-analytics): Set unique conversions graph when adding conversions goal (#27774)
  chore: color design system part 1: banner and accents (#27756)
  chore(experiments): Add tests for funnel attribution options (#27752)
  ...
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.

2 participants