Contact Yart for a relaxed conversation
Your Name * Message *
Your Email *  
Your Phone   
Our Phone:        03 8685 8718 (within Australia)
61 3 8685 8718 (outside Australia)
Contact Yart

Melbourne Content Management and Flash developers

 

for designers, agencies and your website

Resources / Umbraco Tips And Tricks / Google Analytics Contour Forms
Google Analytics Contour Forms

Google Analytics allows you to measure when form buttons are clicked. To do this, you need to add code to the onclick event of buttons. However, Contour adds its own onclick code to buttons and adding Goggle's code via a jQuery onclick handler will not actually execute that code. The form submits prior to the jQuery onclick code being executed.

To get around this mess, add this in your pages PageLoad event

if(Request.Form["name of the button being clicked"].Length > 0)

//this means the form has been submitted

{

Response.Write("javascript to insert Google code to measure when buttons are being clicked");

}

The latest at Yart
Search: