Highlighted

Counting button clicks

sujani_koya
Regular Visitor
sujani_koya

Hi,  I need to count the number of clicks on a button and store that value in a cookie.  Tried to use the jQuery ClickHandler extension but cannot manipulate cookies directly through that.  Should I write the code to increase the cookie's value by 1 in the custom js box of this extension or is there any other way? Thanks a lot

1 REPLY 1

Counting button clicks

Tealium Employee

Hey @sujani_koya 

 

I would use the custom option in the jQuery handler to perform this action as you suggested.

 

2019-07-11_22-18-01.png

Then run the code to read the cookie and increment it by one.