javascript - Need help tracking download goals in SquareSpace using Google Analytics -


i'm trying track events when link clicked download mp3 file using google analytics. site hosted on squarespace. here code attempting record event data:

$(document).ready(function(){     $('.download a').on('click', function (){         ga('send', 'event', 'audio', 'click', 'download');     });   }); 

the "logic" navigate div ("download") anchor when clicking before executing google analytics function.

i'm pretty new google analytics , not javascript i'm doing wrong. appreciated.


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -