ssafronova (ssafronova) wrote in changelog,
ssafronova
ssafronova
changelog

[ljcom] r9814: LJSUP-7333: We should count hits to LJTI...

Committer: ssafronova
LJSUP-7333: We should count hits to LJTIMES
U   trunk/htdocs/index.bml.sup
Modified: trunk/htdocs/index.bml.sup
===================================================================
--- trunk/htdocs/index.bml.sup	2010-12-09 08:39:07 UTC (rev 9813)
+++ trunk/htdocs/index.bml.sup	2010-12-09 08:55:21 UTC (rev 9814)
@@ -233,13 +233,37 @@
                                         <ul>
                                                 <li class="first"><a href="<?siteroot?>/tour_rus/about_lj.bml"><span class="first"><span class="tl-w"><span class="beyou"><span class="txt">Живой журнал</span><span class="sml-txt">что это такое?</span></span></span></span></a></li>
                                                 <li><a href="<?siteroot?>/tour_rus/about_lj.bml#write"><span><span class="delis"><span class="txt">Пишите</span><span class="sml-txt">делитесь мыслями</span></span></span></a></li>
-                                                <li><a href="http://www.livejournal.com/ljtimes/"><span><span class="read"><span class="txt">Читайте</span><span class="sml-txt">свежие новости</span></span></span></a></li>
+                                                <li><a href="http://www.livejournal.com/ljtimes/" onclick="ljtimes_outbound_links(event, this, 'inline')"><span><span class="read"><span class="txt">Читайте</span><span class="sml-txt">свежие новости</span></span></span></a></li>
                                                 <li><a href="<?siteroot?>/tour_rus/about_lj.bml#community"><span><span class="commun"><span class="txt">Общайтесь</span><span class="sml-txt">в сообществе</span></span></span></a></li>
                                                 <li class="last"><a href="<?siteroot?>/tour_rus/about_lj.bml#mobile"><span class="last"><span class="tr-w"><span class="write"><span class="txt">Мобильный ЖЖ</span><span class="sml-txt">пишите отовсюду</span></span></span></span></a></li>
                                         </ul>
                                         </div>
 
+<!--Google Analytics for LJTimes -->
+<script type="text/javascript">
+    var _gaq = _gaq || [];
+    _gaq.push(['ljtimes._setAccount', 'UA-18672965-1']);
+    _gaq.push(['ljtimes._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);
+    })();
 
+    function ljtimes_outbound_links(e, node, category)
+    {
+        // inline on index.bml, if cyr user not logged in
+        jQuery.event.fix(e);
+
+        _gaq.push(['ljtimes._trackEvent', 'Service page', 'click', category]);
+        // if no new tab
+        if (node.target !== '_blank' && !(e.metaKey || e.altKey || e.shiftKey || e.ctrlKey) && e.which === 1) {
+            setTimeout('top.location="' + node.href + '"', 100);
+            e.preventDefault();
+        }
+    }
+</script>
+
 END_OF_HTML
 # LJSUP-4718
 #         unless (LJ::is_enabled('personal_stats_ratings')) {

Tags: ljcom, ssafronova, sup
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments