I have created a property that includes multiple domains, because I need a single set-up for Adobe Analytics. My question is, can I use the Google Analytics "tool" if I need the different domains to go into different GA accounts? It seems that you can't tell the tool exactly which domain to fire on, and it will only use one account.
Am I not seeing something, or is the best workaround for this shortcoming to create domain-driven page load rules and just loading the code provided by Google?
The bummer with this is that you will have to create separate rules for your staging and productions environments for each domain, creating a subdomain criteria (or something else) for firing the correct GA code.
That works too. If you went the route I suggested, you would only need one page load rule and within the rule you dynamically set the account id based on domain, again though this requires more technical knowledge. The downside that I have seen with implementing duplicate page load rules for the same script (GA in this case) for multiple domains is that DTM is not built to only run the rules that the domain needs. Instead it loads everything in the DTM library regardless if you need it or not.
Before DTM executes the script, they check to see if domain is set and matches the site your currently on, if so, it fires, it it doesn't, than the rule does not fire. The problem here, the code still needs to be read which in my experience has increased our page load time.
The more lines of code that you have to run through, the longer the page load time, its that simple. It may not matter to your use case, but in my business, every milli second counts. Glad you found a working solution, but I think its also important to understand the downsides, which most people are not well informed on regarding DTM.
Thanks, @Mike Miller. I did actually set it up easily, creating individual page load rules for each GA account I needed -- using domain-based conditions. I didn't need to write any JS to set the account dynamically.
You do have to create separate rules for your different environments (production and stage), if you have a staging GA account.
Another work around is to create a DTM account for each domain, if you do that you will be able to use the tool, this solution requires you to have multiple DTM accounts though which is sounds like your trying to avoid. The first solution requires a developer, the second does not.