Thanks for the information Beat. After some reading online, I've created this for my registration process. I hope it works without problems.
I have just posted this here incase someone needed some ideas from this. It is not tested yet, I will test it and see if it is working.
I am going to add this to an external JS file and load into my header. Having it in one file is much easier to edit.
The first function is used to automatically track all external links on my website. To be able to track them, a rel="external" has to be part of the link tag.
Code:
// Start when Document Loads
$(document).ready(function(){
// Tracking External Links by adding .external class to outgoing links
$("a[rel*='external']").click(function(){
_gaq.push(['_trackPageview', '/outgoing/'+ $(this).attr('href')]);
});
// Tracking CTA to Register on 2 different positions as a page view
$('a#gae-reg-ini-cta-red').click(function(){
_gaq.push(['_trackPageview', '/GAT/Registration/CTA-initiate']);
});
$('ul.menutop li.170 a').click(function(){
_gaq.push(['_trackPageview', '/GAT/Registration/CTA-initiate']);
});
// Those are tracked as Page Views to be able to use them on goals
// Loaded Registration Form
$('div#registrationTable div#cbfr_intro').load(function(){
_gaq.push(['_trackPageview', '/GAT/Registration/Registration-Form']);
});
// Submitted Registration Form
$('div#registrationTable input.registerButton').click(function(){
_gaq.push(['_trackPageview', '/GAT/Registration/Registration-Form-Submit']);
});
// Invoice/Basket Loaded
$('div.cbpayBasketView div.cbregBasket').load(function(){
_gaq.push(['_trackPageview', '/GAT/Registration/Invoice-Basket-Loaded']);
});
// Moved to Add Payment Address details page (Optional Step?)
$('div.cbformdiv fieldset#cbfr_invoicing_address').load(function(){
_gaq.push(['_trackPageview', '/GAT/Registration/Invoice-Address-Edit']);
});
// Confirmed Order
$('div.cbpayBasketView div#cbpaidButtyellowpay input').click(function(){
_gaq.push(['_trackPageview', '/GAT/Registration/Registration-Completed']);
});
$('div.cbpayBasketView div#cbpaidButtyellowpay input').click(function(){
_gaq.push(['_trackEvent', 'Registration', 'Completed Registration', 'Completed the Registration process', opt_value]);
});
// Cancelled Order
$('div.cbpayChoices a').click(function(){
_gaq.push(['_trackPageview', '/GAT/Registration/Registration-Cancelled']);
});
// Ending Below
});
If one spots any thing wrong, by all means, please let me know
.
I have used the GAE/Registration/Registration-Completed for the label because I think it can be used for goals if I wasn't mistaken (Haven't done this for quite sometime).