Jquery extension query

Gold Contributor
Gold Contributor

I want to track a twitter share button on my website. I am using a Jquery onhandler extension for this but still i do not see any tag firing for a click on that button. I even used with mouse down option in an extension still no success. Any suggestion how i can resolve this?

1 REPLY 1

Jquery extension query

Employee Emeritus

Hello

When working with the jQuery onHandler Extension in TiQ, there are a few things to think about.  The first is does your selector work. The easiest way to test this is within the Google Chrome Developer Tools.  You would copy the jQuery Selector from TiQ and then once you are on the webpage you want to test, you would use the command

 

jQuery('PASTE_SELECTOR_HERE')

 

So if your selector was #socialButtons

 

jQuery('#socialButtons')

 

The results in the Chrome Console should be an array full of elements, something like:

[<a href=​"https:​/​/twitter" target=​"_blank">​Twitter​</a>​, <a href=​"https:​/​/twitter.com" target=​"_blank">​…​</a>​]

 

However if the result is an empty array

[]

 

Then that means you need to find a selector that will match your Twitter button(s).

 

Second thing to confirm is that you have mapped the Data Sources from the Set section of the jQuery onHandler Extension to a Tag under the Tags Tab within TiQ.

 

Let us know if this helps.

 

Brian

Public