1

I use one Google Analytics tracking code across multiple subdomains. I have created a segment for a specific subdomain (lookatme.mysite.com) and the only condition in the segment is that Hostname contains lootatme.mysite.com.

With the segment applied, I see 98 pageviews, which is much higher than I would expect. So I looked in the Behavior-->All Pages view to find out what pages people were going to. With the segment applied, I saw pages that didn't exist on that subdomain.

I then added Hostname as a secondary dimension. Keep in mind, I have a hostname condition in the segment. But in the hostname column, I see values for other subdomains.

Why do I see other hostnames when I have a segment filter on the hostname?

Example of the data I see with the segment applied:

Page         Hostname                    Pageviews
/            lookatme.mysite.com         15
/page1       site1.mysite.com            12
/page2       site1.mysite.com            7
/home        site7.mysite.com            4
/calendar    site3.mysite.com            2

Segment setup

  • Can you please show us how your segment is setup? – Kristian Svensson Oct 4 '17 at 22:59
  • @KristianSvensson I just added an image of the segment setup screen. – Sam M Oct 5 '17 at 23:23
3

) Segments are session based. Pageviews are hit based.

The segment you created will only include the sessions that included the specified sub-domain, however if then looking at the pageviews, it will also include the pageview details associated with any of the other sub-domains or parent domain that were visited during that same session.

If you are going to need to seperate out the pageview data for the subdomain on a regular basis, you may do better to create a new View with an include hostname filter for the relevant subdomain.

You may also want to try modifying your segment to add another condition so that the unwanted main domain and other subdomains are not included... something along the lines of the following example enter image description here

Further info here on when to use segments v filters https://support.google.com/analytics/answer/7331978?hl=en

and following article helps to explain it a bit more clearly https://brianclifton.com/blog/2009/12/09/how-to-choose-between-advanced-segments-versus-profile-filters-in-google-analytics/ (im not affiliated with the website/it's owner or anything the site may be promoting/selling)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.