Adobe's DTM is great when you are only implementing a single dev and single prod report suite for an analytics tool. When more than that is needed, the implementation can get a little bit hairy. Here's some tips and tricks.

Doing reports suites in DTM is simple - just copy and paste! When you have your code managed by Adobe, the implementation is even smoother, since that's less code you have to worry about. However, what about the situation where you want one tool to handle multiple report suites - say for 10 different domains each having their own suites?

The workaround is super easy - just set the s account in the custom code section. For AppMeasurement, it would look something like this:

s.account = getTrackingAccount();

Where getTrackingAccount would just be the report suite I want to set on the site. This is simple enough and can be combined with any type of logic to get your report suite exactly how you want it.

However, with this provides a huge hole. Since DTM would be managing your code in this case, it has no idea that you are running this custom report suite code. Unfortunately, the custom script section only runs once on page views, so this leaves a gap where link calls could not get a report suite, or could get the wrong one.

There's a few different descriptions of the problem, but none seem to mention how to fix it! Example:

There's a couple possible fixes that I've found to work with the link calls quite well.

  1. More complex solution: Make a getTrackingAccount function similar to above, but make sure it is created globally. Then, for every link call, add a custom snippet of code to set the s.account. The same snippet highlighted above would work.
  2. Easiest solution: Since every link call (and page view call) runs the doPlugins function, make sure your doPlugins is defined in the tool custom script section. Then, at the top of the doPlugins function, put the same snippet above to set the s.account. This will ensure all calls have it set in every case.

Unfortunately, DTM keeps bring new quirks every day, so I'll continue to post things as I find them!