JQuery Mobile website geliştirip içerisine Google Analytics script’i eklemek istediğinizde tek yapmanız gereken http://www.google.com/analytics/ adresine giderek uygulamanızı oluşturmanız ve Google’ın size verdiği ID’yi alarak aşağıdaki script’te ilgili yere yazmanız.

<scripttype=”text/javascript”>

var _gaq = _gaq || [];

_gaq.push([‘_setAccount’, ‘Google-App-ID’]);

_gaq.push([‘_trackPageview’]);

(function () {

var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;

ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;

var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);

})();

script>

Üstte bulunan bu script’i <head> head> tagleri arasına yazıp Google’ın sitenizle ilgili verileri tutmasını sağlayabilirsiniz.

No responses yet

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir