1

I manage a large website (WordPress Multisite) which uses subdirectories (not subdomains) for different user's microsites. The entire website has Google Tag Manager installed and a GA4 Analytics tag associated, and we are receiving analytics data.

Individual users would like to have access to the analytics for their microsites.

I am looking for a solution that would allow me to grant access to only analytics data for those subdirectories to individual users.

I am open to solutions using Analytics, or GTM (or both). It's fine if they need to set up their own Analytics account and install a new tag, if that tag can be restricted to a subdirectory.

1 Answer 1

3

With the launch of GA4, they did away with "views" like Universal had in their free version. I believe they are still there in the paid.

That being said, there are two options that I see...

  1. Create separate GA4 tags and launch them via GTM for each microsite. This seems to be the most straight forward as far as granular access. However, it will introduce an untold amount of complexity to your GTM container. You will now have how ever many configs for each microsite. That means, if they all track similar things, you will be duplicating all your event tracking as well. If you have 5 microsites with 15 custom events, you have now 75+ events to monitor/maintain.

  2. Leave GA4 as is and segment out data access via Looker report(s). You would leave your GA4 alone (and GTM) and build report(s) specific to each microsite for their specific needs. Each report would be filtered to show only the data relevant to the user, eliminating the need for traditional access controls. The users can slice and dice their own data and if there is a need to have something else show on the report, if the data is there, it can be easily built.

Personally, as someone who has managed large analytics properties, I would go with #2. It will be easier to manage in the long run and less complicated from a tagging perspective. I would much rather have complexity at the report level rather than the data level. It is just less of a headache. But this depends on your (and your clients) experience level with Looker.

4
  • Thanks for this. I tend to agree. However for option 1 - what is the best practice for restricting a tag to fire only on A) pages that are in a subdirectory or B) an arbitrary (but known) collection of pages across multiple subdirectories?
    – Tom Auger
    Commented May 27 at 16:26
  • How are you determining the micro sites? I would tend to think you would do it by directories. That way it could be easily selected by regex pattern. But it all depends on how you segment the micro sites within your site architecture. Commented May 27 at 20:09
  • Yes, exactly right - subdirectories. Where is that RegEx specified? And in the situation where you are just targeting an arbitrary list of pages, are you just composing a long RegEx page1|page2|page3? Or can you add multiple entries somewhere?
    – Tom Auger
    Commented May 28 at 20:20
  • 1
    @TomAuger, if you want to go with option #1, you would specify the RegEx pattern in the main trigger that launches the GA4 config specific to that microsite. You can use the page_location parameter that comes out-of-the-box or if you are passing a different, customer parameter you could use that. If there is a list of random pages, then you could use a matching group. If you need a subset of pages within a directory, the RegEx could handle it. However, the more complicated you make it, the hard it will be to manage. Commented May 29 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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