Hi Guys,
I have added a script to my website template and somehow it does not work.
I think this could be due to a JS conflict but when using firebug, I cannot see anything abnormal.
Here is the link:
My JS code is as follow
$.noConflict();
$(document).ready(function ($) {
// Using jQuery Event API v1.3
$('#quote_home').on('click', function() {
ga('send', 'event', 'a', 'click', 'quote_home');
});
$('#quote_landlord').on('click', function() {
ga('send', 'event', 'a', 'click', 'quote_landlord');
});
$('#quote_lerg').on('click', function() {
ga('send', 'event', 'a', 'click', 'quote_lerg');
});
$('#quote_business').on('click', function() {
ga('send', 'event', 'a', 'click', 'quote_business');
});
$('#quote_tenant').on('click', function() {
ga('send', 'event', 'a', 'click', 'quote_tenant');
});
$('#quote_holidayhome').on('click', function() {
ga('send', 'event', 'a', 'click', 'quote_holidayhome');
});
$('#quote_referencing').on('click', function() {
ga('send', 'event', 'a', 'click', 'quote_referencing');
});
$('#quote_mortgages').on('click', function() {
ga('send', 'event', 'a', 'click', 'quote_mortgages');
});
});
I am calling the file using this line:
$doc->addScript('templates/protostar/js/tracking.js'); //Google tracking Event Script