Google Tag Manager

Google Tag Manager – Constant variable to improve understanding and readability of Google Analytics settings

Besides centralizing configuration info about your Google Analytics measurement plan, the creation of constant variables to store indexes, improves readability of GA tags.

In the example below, , we create constant variables to store indexes of custom metrics.

So, var names provides meaning and we avoid endless back and forths between your measurement plan document (or your Google Analytics configuration if that kind of document doesn’t exist…so many cases…).

The next time you (or somebody else) go back to Google Analytics settings, you directly understand what is the purpose of each custom metric incrementations.

This point is less important for custom dimensions because, in most of cases, the related value (dynamic or static) already provides meaning. However, you can do it in option in order to indicate related scope information (hit, product, session, user).

Juste…juste Leblanc

PS: I’ve published the short version of this post on my Twitter account the 13th of march 2019: @wissi_analytics