Admin panelinizden kontrol edebileceğiniz Analytics kodu sayesinde temanızda düzenleme yapmadan otomatik olarak bu işlemi gerçekleştirebilirsiniz.

Kodlamaya başlarken;
Tüm bu işlemleri uygulamadan önce sisteminizin yedeğini alınız...
Mysql panelinizden bu sorguyu
INSERT INTO 'settings' VALUES (38, 'analytics', '');
çalıştırın.Kodlama;
sNews.php dosyasını açın,
echo html_input('text', 'website_keywords', 'wkey', s('website_keywords'), l('a_keywords'), '', '', '', '', '', '', '', '', '', '');
kısmını bulun ve aşağıdaki kod ile değiştirin...
echo html_input('text', 'website_keywords', 'wkey', s('website_keywords'), l('a_keywords'), '', '', '', '', '', '', '', '', '', '');
echo html_input('text', 'analytics', 'analytics', s('analytics'), l('analytics'), '', '', '', '', '', '', '', '', '', '');
Kodu bulun
$date_format = $_POST['date_format'];
Bu kod ile değiştirin
$date_format = $_POST['date_format'];
$analytics = $_POST['analytics'];
Kodu bulun
'date_format' => $date_format,
Bu kod ile değiştirin
br />
'date_format' => $date_format,
'analytics' => $analytics,
3) En.php içerisinde en alt satıra ekleyin (?> anahtarının hemen üstüne)
$l['analytics'] = '<br />Google Analytics Id Numaranız(Örn. UA-6485042-1) ';
4) Index.php içerisinde kodu bulun
</body>
Bu kod ile değiştirin
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '<?php echo s('analytics'); ?>']);
_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>
</body>
Artık sisteminize admin panelinizden Google Analytics hesabınızı rahatlıkla entegre edebilirsiniz...
Hiç yorum yok:
Yorum Gönder