Closed xmedeko closed 7 years ago
PR that removes these is welcome.
I am not sure if the ReferralUrl
may be removed or it's usage has to be fixed.
I cannot find that Google Measurement uses HTTP Referer in the docs Reference Transport. I have found just the Document Referrer , but that is included in the request body, not the header.
So, I think the following may be removed (breaks backward compatibility) or it should be changed to the Document Referrer: GeneralParameters.ReferralUrl
, TrackerBase.TrackingDomain
(from the ctor, too), TrackerBase.TrackingDomainConfigurationKey
.
I have just a limited experience with GA and app tracking, I know nothing about web page tracking, campaigns, etc. So, I do not know what is Document Referrer good for in GA. The TrackerBase.TrackingDomainConfigurationKey
is used in the GoogleAnalyticsTracker.MVC4, MVC5, WebApi, WebApi2, Nancy.
In that case let's leave it in - for web scenario's this will be needed.
But AFAIK HTTP Header "Referer" is not used by the GA (or does it?). It should be changed to the DocumentReferrer
like the GoogleAnalyticsTracker.Owin.Tracker
does already.
I think they do use it, but not sure.
I would say that the plain Google Measurement Protocol does not use HTTP referer header field. But the Google Analytics JavaScript library uses transforms it to the Document Referer: This field is initialized by the create command and is only set when the current hostname differs from the referrer hostname ... (I guess it uses the document.referrer
.)
It's my understanding of the GA docs, I have not tested it though.
Yep, I've tried send an event by curl
with the dr
field and it has appeared as Full Referrer
in the GA web gui. When I have removed the dr
field and send the event by the curl --referer ...
, then the Full Referrer
is (direct)
.
Hmmm... Up for another PR? :-)
But what should PR do?
TrackingDomain
.DocumentReferrer
.TrackingDomain
and set it as DocumentReferrer
, if it is not set in the GeneralParameters
.TrackingDomain
, merge this task with #124, make some DefaultParameters
and change the code to use these DefaultParameters
instead.2) I think
Ok, I will remove GeneralParameters.ReferralUrl, TrackingDomain, CharacterSet, Language
. And I have found that TrackerBase.Hostname
is used in the SimpleTracker
only. So I will push it down there.
I agree to remove those parameters since they are not mentioned any time in the documentation.
https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters
The
GeneralParameters.ReferralUrl
is not used, since theparameters
in theBaseTracker.RequestUrlAsync
contains properties with theBeaconAttribute
only.Note:
TrackerBase.CharacterSet
andLanguage
seems unused, too.