Each user on our website has their own subdomain (e.g. bob.example.com, elephant.example.com) and they get paid for the traffic that they send to this subdomain. How can I wire up Google Analytics so that I can view statistics (views, countries, browsers, etc) for each domain seperately? I'm not sure if this is an Analytics JS code thing, or if it tracks already and I am unable to find it in the GUI

My current Google Analytics code is this

  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

  ga('create', 'UA-123456-1', 'example.com');
  ga('send', 'pageview');


Any assistance would be extremely appreciated, thank you.


According to the Google Developers guide, you don't have to set up multiple code snippets for each site, as long as they share the same top level domain:

Google Developer's Guide

Here's a good article on displaying subdomains in the dashboard.

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.