3

I am thinking to add Referrer-policy header in my app. Setting this header to :-

Referrer-policy - origin when cross origin will send only base url (http://www.example.com) in referer header to all the third parties.

Is there any chance that this might effect Google-Analytics tracking ?

1 Answers1

3

AFAIK Google does not use HTTP referer header field. It uses it's own Document Referrer dr field which is initialized as:

This field is initialized by the create command and is only set when the current hostname differs from the referrer hostname, unless the 'alwaysSendReferrer' field is set to true.

And you may change it by: ga('set', 'referrer', 'http://example.com')

xmedeko
  • 7,336
  • 6
  • 55
  • 85