I have been working on integrating GTM and GA to my website, using Environment Variables to setup GA Property Views for different setups.
I found similar solutions in various blogs, i.e., by setting up Lookup Tables or RegEx Table, with lookups for GA-Tracking-ID.
ISSUE
Lookup Tables adds a prefix vtp_
to the keys present in default GA-settings obj, as shown below:
Due to this, GA doesn't work. If I use the GA Settings Variable directly, Everything works fine.
This happens on current Dashboard Setups for GTM and GA.
You cannot use a Google Analytics Settings variable as the output of a Lookup Table variable for a simple reason:
The "Google Analytics Settings" field in a tag is the only place where you can use a Google Analytics Settings variable, and it is the only type of variable you can use there.
In other words, if you create a Lookup Table variable that returns Google Analytics Settings variables, there's no place to add that variable to, since the only valid place would be the Google Analytics Settings field which, as noted above, doesn't accept Lookup Table variables.
Trying to add the Lookup Table into the "Tracking ID" field, for example, is a mistake, since the table returns a Google Analytics Settings object rather than a valid tracking ID.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With