grpc.io icon indicating copy to clipboard operation
grpc.io copied to clipboard

Analytics: resolve redundant-hostnames warning

Open chalin opened this issue 2 years ago • 7 comments

This is the warning

Property grpc is receiving data from redundant hostnames. Some of the redundant hostnames are:

  • grpc.io
  • www.grpc.io Redundant hostnames are counted as separate rows in reports, so hits that are going to the same page on your site from different hostnames will be split into multiple rows. With data split across multiple rows, traffic to specific pages will appear lower than it actually is.

To avoid this problem, consider setting up a 301 redirect from one of your redundant hostnames to the other, or create a search-and-replace filter that strips "www." from hostnames.

Google Tag Assistant Recordings can help you verify that your redirect is setup correctly, or that your filter is working as intended.

For details about filters, see Search-and-replace filters.

chalin avatar Jul 22 '22 18:07 chalin

/cc @ejona86 @thisisnotapril

chalin avatar Jul 22 '22 18:07 chalin

This might be an old message. I've selected "recheck".

chalin avatar Jul 23 '22 00:07 chalin

Yep, this is still a problem, which can be confirmed by the fact that the www domain pages are served with status 200 not 301:

$ curl -i https://www.grpc.io 2>/dev/null | head -25 | grep ^H         
HTTP/2 200

Note: drop the grep to see the full response header.

chalin avatar Jul 25 '22 17:07 chalin

This same problem shows up under GA4, unsurprisingly:

image

chalin avatar Sep 26 '22 21:09 chalin

Here's what I'm getting now that #1052 has been merged and deployed:

$ curl -i https://www.grpc.io 2>/dev/null | grep '^[lH]'
HTTP/2 301 
location: https://grpc.io/
$ curl -i https://grpc.io 2>/dev/null | grep '^[lH]' 
HTTP/2 200

I've triggered a re-verification in GA:

Notification archived while verifying. Most checks verified within 24 hours, but some may take longer. image

chalin avatar Sep 27 '22 12:09 chalin

Nope, that didn't solve the problem. GA still reports redundant hostnames:

Redundant Hostnames

First detected: Jun 28, 2020, 2:19:44 PM Last detected: Sep 28, 2022, 1:08:36 AM

Property grpc - UA is receiving data from redundant hostnames. Some of the redundant hostnames are:

  • grpc.io
  • www.grpc.io

Redundant hostnames are counted as separate rows in reports, so hits that are going to the same page on your site from different hostnames will be split into multiple rows. With data split across multiple rows, traffic to specific pages will appear lower than it actually is.

To avoid this problem, consider setting up a 301 redirect from one of your redundant hostnames to the other, or create a search-and-replace filter that strips "www." from hostnames.

Google Tag Assistant Recordings can help you verify that your redirect is setup correctly, or that your filter is working as intended.

Learn more: https://support.google.com/analytics/bin/answer.py?answer=1034834&hl=en-US

The Tag Assistant link in that message is to the legacy version. Here are updated links:

  • https://chrome.google.com/webstore/detail/tag-assistant-companion
  • https://tagassistant.google.com

chalin avatar Sep 28 '22 13:09 chalin

I've triggered a re-check again. Maybe I issued the re-check too earlier after the merge yesterday.

chalin avatar Sep 28 '22 13:09 chalin