RuFFCuT
RuFFCuT

Reputation: 317

Google Analytics setup (advanced Javascript)

I have three buttons on my website, all of the buttons opens a pop up contact form.

The three buttons are for different things e.g:

Request a call Get a brochure Visit us

But they all open the same form; What I want to do is use Google analytics to track the form and know what button they originally clicked; is this possible?

Can an onClick function be used on the button or something?

Really need some help on this!

Upvotes: 0

Views: 127

Answers (2)

jk.
jk.

Reputation: 14435

Event tracking would be a better option since it won't over-inflate your pageviews. You can also set events as goals now.

<a href="#" onClick="_gaq.push(['_trackEvent', 'Contact Form', 'Button Click', 'Request a call']);">Request a call</a>

See the Event Tracking Guide

Upvotes: 1

MCSI
MCSI

Reputation: 2894

yes it's posible... '_trackPageview' it's your what are you looking for

check this links:

Official:

http://support.google.com/analytics/bin/answer.py?hl=en&answer=2558867

Others:

http://viget.com/advance/how-to-track-internal-links-in-google-analytics (recommended)

http://www.pointit.com/how-to-track-button-clicks-with-google-analytics/

Upvotes: 1

Related Questions