Triggering a Tag on Click or other Event



I am new to tealium TMS ,

i created a click event in TMS for GUA but can i do something similar to this

ON-Click of any TOP NAV Category
Event Action: Click
Event Category: TOP Nav
Event Label: LINK

I need to include the below line after the EVENT LABEL 

"Main Category : Sub-Category"

event 1.PNG

EX: I have a top navigation menu bar with dropdown sub categories 

How do i do that in tealium?


Triggering a Tag on Click or other Event

Gold Contributor
Gold Contributor
Hello @Anonymous,

I would suggest you to create new JavaScript extension to write a code which encompass appropriate CALSS or ID associated with Main and Sub Menu and then set an event variable to capture the values.

Let me know if you need any more help to proceed further.

Hope it helps!!! Happy Learning!!!

Triggering a Tag on Click or other Event

Employee Emeritus

@Anonymous If your jQuery selector in the onHandler can encompass all the elements needed then consider extracting the values for the event_label with a little bit of code in the variable's value. Our suggestion is to try to avoid raw code where you can, for ease of management. It's easier for someone to see how variables are set in the onHandler extensions. However, if you need more than just a small snippet of code, then @Srinivasan is correct, you'll want to create a JavaScript extension and write custom code to get the values. 



Triggering a Tag on Click or other Event

Rookie Contributor

What would be the best way to make sure that the value collected by the handler is correct?