How to add Google events tracking code to CTA button on popup?

I have installed a pop-up plugin on my Wordpress site. The pop-up has a CTA button that links to an inner page and I would like to track clicks on the button using Google events tracking.

This is the Google analytics code I'm using:
onClick="ga('send', 'event', { eventCategory: 'popup', eventAction: 'click'});"
Code (markup):
...and the following code is from the plugin which outputs the CTA button link:
if ( $has_cta ) {
        $cta_button_tag = sprintf(
            '<a href="%1$s"...
Code (markup):
How to add Google events tracking code to CTA button on popup?

from Google Analytics http://ift.tt/1WInFzm
via IFTTT
Previous
Next Post »
Thanks for your comment