Add onClick Event Data to Buttons

I’m trying to add some onClick event data to my buttons.

If I was adding it to a plain URL link it would look like this:

<a href="http://somelink.com" onclick="ac_event('Event Name', 'Event Value');">Some link</a>

But where can I add the onclick="ac_event('Event Name', 'Event Value'); part when building buttons inside cornerstone?

Hi There,

Instead of using the button shortcode, you can try with this HTML:

<a class="x-btn x-btn-red x-btn-real x-btn-square x-btn-mini" onclick="ac_event('Event Name', 'Event Value');" href="#example" title="Example" data-options="thumbnail: ''">Your Link</a>