This topic has 5 replies, 3 voices, and was last updated 10 years by gm713.

  • Author
  • #22190
     gm713
    Participant

    How do I add google analytics event tracking code to a button. I want to be able to add this

    onClick=”ga (‘send’, ‘event’, ‘something’, ‘something’, ‘something’);”

    #22250
     Catalin
    Moderator

    Please try a Google search or a development forum for getting this answer.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #22265
     gm713
    Participant

    Hi Catalin,

    Thanks for your reply, but let me elaborate. I’m not asking for a generic answer at an HTML level, but for KLOE theme specific method of accomplishing this.

    To elaborate, in HTML I would write the following line:

    Hyperlink or a button

    So, the questions is – How do I append GA’s event tracking code with hyperlinks/buttons?

    #22267
     gm713
    Participant

    Sorry, the link above got rendered as an HTML element despite of some replacements . This is what I meant:

    “[” a href=”example.com” onClick=”ga (‘send’, ‘event’, ‘Anchor Tag’, ‘Menu Click’, ‘About Me’);”]”About”[“/a”]”

    PS: Replace “[” (including quotes) by < and “]” by >:

    #22737
     Abe
    Keymaster

    Hi @gm713
    Add it to a page by editing it’s contents from WP admin – Pages – edit a page. From the Text tab of the editor add it just like regular HTML. This is basic WP functionality, nothing related to KLEO of interpreting things

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #22778
     gm713
    Participant

    Perfect, thanks for your help.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Google Analytics – Event Tracking’ is closed to new replies.

Log in with your credentials

Forgot your details?