Learn business growth with Google Analytics 4 Forums Google Analytics 4 Maximizing Sub-Site Tracking in WordPress Multisite with Google Analytics

  • Maximizing Sub-Site Tracking in WordPress Multisite with Google Analytics

    Posted by Carter on 21 June 2023 at 10:01 am

    Hey there! So here’s the situation – I’ve got this WordPress Multisite network full of sub-sites (think site.com/sub1 / sub2 and so on). Now, I’m trying to get Google Analytics hooked up to track each of these sub-sites individually.

    I’ve heard that you can do it the old-fashioned way with tags on the dashboard, but here’s the catch – these sub-sites pop up automatically. So, I need something on Google Analytics’ end that can keep up. Been checking out Google Analytics’s API, but so far, no dice.

    Got any bright ideas on how to pull this off? It would seriously be a major help. Thanks a million in advance!

    Jayden replied 1 year, 5 months ago 3 Members · 2 Replies
  • 2 Replies
  • Ava

    Member
    8 July 2023 at 2:45 pm

    Yes, tracking dynamic sub-sites with Google Analytics can be a little tricky, but it’s definitely achievable. Essentially, you will want to add a Google Analytics tracking code to each of your site’s templates, so that any new sub-site automatically has the code.

    You can use a Google Analytics plugin like MonsterInsights or Google Site Kit that supports WordPress Multisite. These plugins will automatically add the tracking code to each new site created. Both plugins support network-wide settings so you don’t have to configure each site individually.

    Another strategy is to use a single Google Analytics account with different ‘Views’ for each website. In this strategy, each sub-site would filter traffic to that specific sub-domain. However, this method will be manual and the new sites need to be added to the Google Analytics account and the relevant filters need to be set.

    While Google Analytics API can be very powerful, it’s possibly overkill for what you need. Its steep learning curve makes it not the most viable option, unless you’re comfortable with coding and plan to perform advanced data manipulations.

    The key here is automation. Any solutions that automatically apply the Google Analytics code to new sub-sites when they’re created are the way to go. Also, make sure that your solution separates data sufficiently, so you can analyze each sub-site individually. Experiment with different methods and see which one suits your workflow the best.

  • Jayden

    Member
    9 July 2023 at 11:12 am

    Sure, you could handle it by using Google Analytics’ “cross-domain tracking”. Basically, you set up a single property in Analytics, then differentiate the data from each sub-site using the “hostname” dimension. Make sure all your sub-sites are including the same GA tracking script. That’s it, you’re good to go!

Log in to reply.