How to differentiate between 2 GA Tags having same mapped variable names?

Bronze Contributor
Bronze Contributor

If we have two GA tags and the requirement is to send a collect event to one specific GA tag using utag.link() method (javascript extension). what will be the syntax?

Note: The mapped variables names (event category, event action, and event label) are same in the both GA tags. How to differentiate using utag.link syntax or any other extension.

3 REPLIES 3

How to differentiate between 2 GA Tags having same mapped variable names?

Gold Contributor
Gold Contributor

Hi @kunal_s ,

You could use the syntax of utag.link(data_object, callback, [uid_array]); You can reference the tag specific uid in [uid_array] for firing the particular GA tag.

Reference to the link:

https://docs.tealium.com/platforms/javascript/api/tracking-functions/#utag-link

Example:

considering your Tag id as 12,

utag.link({....} , [12]);

 

Thanks

Its Not Who I am Underneath, but What I Do That Defines Me

How to differentiate between 2 GA Tags having same mapped variable names?

Silver Contributor
Silver Contributor

An alternative solution, though the previous repliers is ideal and if you don't have dev resources, would be to use load rules based on the the values you are passing. So only allow the GA tag to fire if the utag.link() call has specific variable values for each of your GA tag.

How to differentiate between 2 GA Tags having same mapped variable names?

Bronze Contributor
Bronze Contributor
Thanks @dragooon for the solutions, this syntax worked for me.
Public