Da un confronto tra i due siti si evidenzia un errore nella versione it (joomla)
Errore: track is not defined
File sorgente: http://www.academyoffools.it/
Riga: 25
che si riferisce a questa funzione:
codice:
jQuery(function($) {
$('.contentPane').hide();
$('.headPane').toggle(function(){
track($(this).children('.accrocheImg').children('img').attr('alt'));
}, function(){});
$('.headPane').click(function() {
$(this).next('.contentPane').slideToggle('slow');
$(this).children('.accrocheTxt').toggleClass('accrocheTxtOpen');
});
$('.headPane').hover(function () {
$(this).children('.accrocheImg').children('img').addClass("survolimg");
}, function () {
$(this).children('.accrocheImg').children('img').removeClass("survolimg");
});
});
mentre la versione .com (funzionante)
codice:
$(window).ready(function() {
$('.contentPane').hide();
$('.headPane').toggle(function(){
track($(this).children('.accrocheImg').children('img').attr('alt'));
//var chapitre = $(this).children('.accrocheImg').children('img').attr('alt');
//track(chapitre);
}, function(){});
$('.headPane').click(function() {
$(this).next('.contentPane').slideToggle('slow');
$(this).children('.accrocheTxt').toggleClass('accrocheTxtOpen');
});
$('.headPane').hover(function () {
$(this).children('.accrocheImg').children('img').addClass("survolimg");
}, function () {
$(this).children('.accrocheImg').children('img').removeClass("survolimg");
});
/* GA tracking */
var track = function(label) {
return _gaq.push(['_trackEvent', 'Content', label]);
//alert(label);
}
});
nella prima manca questa parte:
codice:
/* GA tracking */
var track = function(label) {
return _gaq.push(['_trackEvent', 'Content', label]);
//alert(label);