• I need to make a distinction in the page view statistics for the homepages of my main domain and a subdomain that I’ve configured to be tracked with the same script.

    I have followed the tracking configuration instructions from
    this thread. Data is logged, but for both sites homepages I get one entry that is just / (slash for webroot). How could I mark the visits from the subdomain, so that in all stats I can make that distinction for them?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @vloo

    What do you mean by

    How could I mark the visits from the subdomain,

    Kind regards

    Mat

    Plugin Support varunmatomo

    (@varunmatomo)

    @vloo has this now been resolved? Are you able to provide any further insight ?

    Thread Starter Vladimir Vassilev

    (@vloo)

    Hello, @varunmatomo and @mattmary ,

    Yes, I finally got it working. Here’s what I did:

    1. Added a wildcard for subdomains of the main domain to be tracked by the same script in the plugin settings: *.example.com
    2. I added a wildcard for the domains in the tracking script:
      _paq.push(["setDomains", ["*.example.com"]]);
    3. I added a prefix to the page title of all pages from subdomains, so that I could easily distinguish them in the stats from pages that come from the main domain by adding this to the tracking script:
      _paq.push(['setDocumentTitle', document.domain + "/" + document.title]);

    With this solution I can track all the subdomains in the main Matomo installation that is on the main domain and have a distinction between pages from the different subdomains.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Tracking subdomains and actually having a distinction between them’ is closed to new replies.