by smiket
2 replies
  • SEO
  • |
Hello ladies and gents,

I need to track button clicks with Google Analytics on my landing page. The buttons have an affiliate hyperlink redirect to a sales page. I know I need to track onClick events, so I am trying to figure out the correct script to attach to my button and if I need to do any modifications to the analytics tracking code I have on the page.
Also, and this might be a stupid question, is there any way to track what happens on the sales page(form submits, etc.). I am currently learning how to use GA and Prosper202 for cpa offers on 7search.

Thank you for your kind help!
#analytics #clicks #onclick #tracking
  • Profile picture of the author wbakhos
    You need to append the following to your buttons

    _trackEvent(category, action, opt_label, opt_value, opt_noninteraction)

    Then in Analytics when setting your goals select Event tracking and fill in what your Categories, action, opt-label, value etc etc is (you can simply replace whats in the above link and remove what you don't use)

    So it will look something like this:

    onclick="_gaq.push(['_trackEvent', 'Signup', 'Click', 'TheButton']);">

    This would be for a 'Signup' category, the action is 'Click' and the particular button is TheButton (ie opt-lable).

    Most of the time is your using the new Analytics code then you can get away with just doing this. If you want to go deeper you may need to amend the code. Google has decent tutorials for this.
    {{ DiscussionBoard.errors[8703142].message }}
  • Profile picture of the author smiket
    Thank you. I know I should take the time to learn it for myself and I shall. I had half of mind to start split testing some similar , more attention grabbing questions ,to sate my hunger for an answer . That's why your answer is most welcome!
    {{ DiscussionBoard.errors[8703387].message }}

Trending Topics