Okay
  Public Ticket #712818
Adding Google Event Tracking to Nectar Buttons
Closed

Comments

  • Corey started the conversation

    Hey,

    I'm trying to add Google  event tracking to the Nectar buttons on my site.  However for some reason the events are not tracking.  Have I set it up correctly? Here's the Shortcode I'm trying to use: 

    [button open_new_tab="true" color="extra-color-2" hover_text_color_override="#fff" size="medium" url="#2" onClick=”ga(‘send’, ‘event’, ‘ ADWRDSHeader’, ‘Click’);” text="Book Free Consult " color_override=""]

    All I could find in terms of support was the below ticket from 2013:

    https://themenectar.ticksy.com/ticket/128024

    Is this advice still valid? 

    Thanks in Advance! 

  •  8,992
    Tahir replied

    Hey ,

    The advise still holds true. You cant add the onclick event directly using the shortcode and would need to paste in the relevant HTML Code in a RAW HTML Text Block Element. Like Below . See screenshot: http://prntscr.com/aivqvs 

    <a onClick='ga('send', 'event', ' ADWRDSHeader', 'Click');" class="nectar-button medium extra-color-2 regular-button" target="_blank" href="#2" data-color-override="false" data-hover-color-override="false" data-hover-text-color-override="#fff" style="visibility: visible;" >Book Free Consult  </a>
    

    Best. 


    ThemeNectar Support Team