Tealium - Lookup Tables based on jQuery onHandler

182 Views Asked by At

I would like to setup Google Analytics event tags based on the jQuery onHandler. I would like to use a lookup table with the jQuery as the key and push the GA event parameters as the value. Only issue is that I don't know how to set the jQuery as the lookup value.

Any suggestions?

1

There are 1 best solutions below

5
On

If you are using Tealium then the way this would be done is with two extensions. The first one would set a new variable to the value obtained with jQuery, the second one would be the lookup table that would utilize the same variable in the "Lookup Value In" field. If both extensions are scoped the same then the jQuery extension will need to be placed above the lookup table so it will run first.

Here is an example of the two extensions you could set up:

This first one sets a new variable (new_var) to a value when you mousedown on the selected element. This can be changed to however you want to populate your data. jQuery Extension setting new_var to a value

This next extension is the lookup table where your lookup value is the new_var that you just populated, and the destination is the variable that you will map into your tag. Lookup Table extension