-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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): Use fbclid to calculate channel type #27686
Conversation
9fc152e
to
889e1a0
Compare
has_gclid=ast.CompareOperation( | ||
op=ast.CompareOperationOp.NotEq, left=aggregate_fields["$entry_gclid"], right=ast.Constant(value=None) | ||
), | ||
has_fbclid=ast.CompareOperation( | ||
op=ast.CompareOperationOp.NotEq, left=aggregate_fields["$entry_fbclid"], right=ast.Constant(value=None) | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the right way to compare against NULL? My understanding is that Clickhouse behaves like Postgres and any comparison against NULL
will return NULL
. Does HogQL work around this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I can just use the isNull function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, anyway
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Problem
See https://posthoghelp.zendesk.com/agent/tickets/23328
Changes
Use
fbclid
in the calculation.It's pretty low in the calculation, so it can't override UTM tags and known referrers, but if all else fails, this sets traffic with a
fbclid
to either Organic Social or Paid Social. (We can't know just from thefbclid
whether it is paid or not, as meta addsfbclid
to all URLs, not just paid).Does this work well for both Cloud and self-hosted?
Yes
How did you test this code?
Added a test