Google Analytics in button shortcode

Homepage Community Forums General Google Analytics in button shortcode

  • This topic has 4 replies, 2 voices, and was last updated 11 years ago by Wes.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #7780
    josemv
    Customer

      HI there,

      I would like to know how could I include Google Analytics into button shortcodes, the latter being <a href="PLACE_LINK_HERE" class="button small black">Small</a>

      Best regards,

      #7782
      josemv
      Customer

        Maybe this ? (assuming I have the new Google Analytics code loaded in my site’s header)

        
        <a href="PLACE_LINK_HERE" onClick="ga('send', 'event', 'category', 'action', 'label', numerical value);" class="button small black">Small</a>
        #7798
        Wes
        Moderator

          I honestly wouldn’t know the proper way to this….I usually just add the code in the Genesis Theme Settings in the “head” area.

          Anyone else know the best way to handle this?

          #7803
          josemv
          Customer

            Just to clarify, my intention is to track button clicks, that’s why the issue was involving button shortcodes…

            #7811
            Wes
            Moderator

              Oh I see, if I come across something I’ll post it here.

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.