title: How to add Google events tracking code to CTA button on popup?
body: <p>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.</p>
  
  <p>This is the Google analytics code I'm using: <code>onClick="_gaq.push(['_trackEvent', 'Popup', 'click']);"</code></p>
  
  <p>and the following code is from the plugin which outputs the CTA button link:</p>
  
  <pre><code>if ( $has_cta ) {
          $cta_button_tag = sprintf(
              '&lt;a href="%1$s" class="wdpu-cta" target="%2$s"&gt;%3$s&lt;/a&gt;',
              esc_url( $this-&gt;cta_link ),
              esc_attr( $cta_target ),
              esc_html( $this-&gt;cta_label )
          );
  </code></pre>