You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a long and protracted conversation with Segment support, it seems that context_campaign_referrer should be used instead of referrer (referer?).
referrer: contains the address of the previous web page from which a link to the currently requested page was followed context_campaign_referrer: The previous page according to the UTM parameters:
- context is Segment's word for the payload sent with the page ping
- campaign is their word for UTM attributes
Investigation
To test this, run:
-- replace "segment" with the correct schema
select context_campaign_referrer, referrer, * from segment.pages
where context_campaign_referrer != referrer
and context_campaign_referrer is not null
and referrer is not null
order by received_at desc
limit 1000
Inspect some of the results.
When running this (+ a few permutations) I found that referrer is filled in way more often than context_campaign_referrer.
Where both existed, context_campaign_referrer seemed to have "more interesting" results (i.e. an external website rather than an internal one).
Recommendation
I'm not sure which one is technically more correct (e.g. What Would Google Do?)
Next time we work with a client with Segment data, let's look into this. For now, if someone else finds this issue, it's possible for them to work around it by pre-processing this data to coalesce the two files together (or pass it through using the pass_though_cols variable)
The text was updated successfully, but these errors were encountered:
Google Optimize split URL testing passes the original "document.referrer" value in the "utm_referrer" parameter. Google Analytics will use "utm_referrer" over "document.referrer". Internal client-side sessionization logic I've built in the past, has used "utm_referrer" values if present over "document.referrer" so that is my preference. Happy to chat more about it.
After a long and protracted conversation with Segment support, it seems that
context_campaign_referrer
should be used instead ofreferrer
(referer
?).referrer
: contains the address of the previous web page from which a link to the currently requested page was followedcontext_campaign_referrer
: The previous page according to the UTM parameters:-
context
is Segment's word for the payload sent with the page ping-
campaign
is their word for UTM attributesInvestigation
To test this, run:
Inspect some of the results.
When running this (+ a few permutations) I found that
referrer
is filled in way more often thancontext_campaign_referrer
.Where both existed,
context_campaign_referrer
seemed to have "more interesting" results (i.e. an external website rather than an internal one).Recommendation
I'm not sure which one is technically more correct (e.g. What Would Google Do?)
Next time we work with a client with Segment data, let's look into this. For now, if someone else finds this issue, it's possible for them to work around it by pre-processing this data to coalesce the two files together (or pass it through using the
pass_though_cols
variable)The text was updated successfully, but these errors were encountered: