2

I have a multi-tenant website hosting platform—think Squarespace or Wix but for a really niche target market. Each website on the platform can have its own TLD.

I want to use Google Analytics to track page views of these websites, but unsure how to go about it with each site technically being a different website.

Can I do this with a single Google Analytics property? As I don’t want to have to create X properties for X number of websites, and remember to have to create a new property and add its ID when on boarding a new website. I also want to be able to create events, goals, etc in a single property rather than across multiple properties.

  • You can tell GA anything you want. :-) In order to answer your question I have two questions for you: Are you hoping to be able to see data for each website individually (as though the GA for each was completely separate)? How many websites (approximately) would be included? – Reve Oct 26 '18 at 16:41
  • @Reve Yeah, I’d like to see data for individual sites. They’d probably be a dozen or so sites. – Martin Bean Oct 27 '18 at 21:15
1

Assuming here that you don't need help with GA/GTM installation and you've got your tenants' permission to do so, here's my take on GA-side setup to get the analytics you want. There's no way to avoid some individual GA setup per domain, but for a relatively small number of sites you can share a Property but have separate GA data using View filters. There's a limit of 25 Views per Property, which is why the number of tenant sites mattered to my answer.

Each domain will use the tracking ID of the shared Property, and you'll create a View for each domain that has a filter of the Predefined type that includes only traffic to the correct hostname.

screenshot of View filter setup

The result will be a View that only knows about data to the appropriate domain.

[If you would like a commingled View in which you can still tell the difference between sites, you could use a Custom Advanced filter to extract the Hostname (request field A, Hostname (.*)) and the Request URI (request field B, Request URI (.*)), and output the concatenation ($A1$B1, or maybe /$A1$B1 since GA likes things that look like directories).]

You can't share goals exactly - they are View-specific - or removed URL parameters, site search settings, or bot filtration, but you can set up a "template" View with the shared definitions and copy it for each site-specific View, adding the domain-specific filter after copying. If you want to add other filters or goals after the fact, you can pull in filters from other Views in the Add Filter screen, and use the View-level "Share Assets" screen to generate a link that will allow you to import specific goals to other Views.

If you install Google Tag Manager on the sites instead of GA directly (which is recommended in any case), you can share event definitions as well. They will get sent to the Property and your filters will have them show up in the appropriate Views. Your ability to share triggers will be limited by how alike the markup of the various tenant sites is, but the fact that you can have multiple triggers for the same tag will allow you to send the same event data to GA even if the details of the event happening vary from site to site.

  • How much time does it usually take for GA to register traffic on newly created view for specific tenant on multi tenant application? – Lazar Nikolic Jun 12 at 8:49
  • I would expect a newly created view to show some data the next day (on a highly trafficked site I see basic data within a day, though I don't count on data connections - like attribution modeling - until two days have passed). GA doesn't "know" that it's a multi-tenant site, so that won't change anything about how the reporting works. If you aren't seeing any data the following day, check the usual suspects: tracking code setup on the tenant site, correctness of the filter definition. – Reve Jun 12 at 13:25
  • Thanks Reve!!!! – Lazar Nikolic Jun 12 at 13:45

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.