-
Notifications
You must be signed in to change notification settings - Fork 135
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
Assign traffic source, medium, campaign for more traffic parameters beyond gclid #343
Comments
I'm on board with parsing gbraid, wbraid, fbclick, and ttclick. I'm just not sure why there are so many checks in the case statements for variations of source/medium/campaign. If a |
It could be that advertisers pass along custom UTMs that should be respected. It also checks for source value within medium and campaign, to make sure that all or none are updated. Otherwise we might get inconsistent UTMs There are probably better ways to do all the checks. Might even make sense to move the entire logic to separate model for easier maintenance. Many ad networks have their own click IDs that we could add later. |
Thanks for the reminder. This mirrors the logic we have implemented today.
|
Currently, there is the CTE
detect_gclid
instg_ga4__events.sql
that reconstructs source, medium and campaign if the URL parametergclid
is present inpage_location
Now, there a several more URL parameters that can be linked to paid ad clicks:
gbraid
andwbraid
: these are alternatives to gclid that Google uses (https://www.customerlabs.com/blog/what-are-gclid-gbraid-and-wbraid-parameters/)fbclid
: click ID for Facebook/Meta/Instagram paid ads. In most cases source is set to l.facebook.com, m.facebook.com, or lm.facebook.com, which effectively splits the traffic. Same for instagram, which normally has the source instagram.com or l.instagram.comttclid
: click ID for TikTok paid ads. Here the source is usually null unless set explicitlyThis list is of course not complete, but should capture a much larger share of unassigned paid traffic.
Proposed change:
The text was updated successfully, but these errors were encountered: