竹磬网-邵珠庆の日记 生命只有一次,你可以用它来做些更多伟大的事情–Make the world a little better and easier


238月/115

收集的一些主流网站的GA代码

发布在 邵珠庆

豆瓣首页、豆瓣读书:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-7019765-1']);
_gaq.push(['_addOrganic', 'baidu', 'word']);
_gaq.push(['_addOrganic', 'soso', 'w']);
_gaq.push(['_addOrganic', '3721', 'name']);
_gaq.push(['_addOrganic', 'yodao', 'q']);
_gaq.push(['_addOrganic', 'vnet', 'kw']);
_gaq.push(['_addOrganic', 'sogou', 'query']);
_gaq.push(['_addIgnoredOrganic', '豆瓣']);
_gaq.push(['_addIgnoredOrganic', 'douban']);
_gaq.push(['_addIgnoredOrganic', '豆瓣网']);
_gaq.push(['_addIgnoredOrganic', 'www.douban.com']);
_gaq.push(['_setDomainName', '.douban.com']);
_gaq.push(['_trackPageview']);
_gaq.push(['_setVar', '224']);

(function() {
    var ga = document.createElement('script');
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    ga.setAttribute('async', 'true');
    document.documentElement.firstChild.appendChild(ga);
})();
</script>

携程首页、国内机票:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
        var pageTracker = _gat._getTracker("UA-3748357-1");
        pageTracker._setDomainName("ctrip.com");
        pageTracker._addOrganic("soso", "w");
        pageTracker._addOrganic("sogou", "query");
        pageTracker._addOrganic("yodao", "q");
        pageTracker._initData();
        pageTracker._trackPageview();
} catch(e){;};
</script>

麦包包首页

<script type="text/javascript">

//ga
var _ga_username = '{if $globals.user_login}{$globals.user_info.username}{else}非会员{/if}';
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
google_analytics();
function google_analytics(){
try {
var pageTracker = _gat._getTracker("UA-10586344-1");
pageTracker._addOrganic("baidu","word");
pageTracker._addOrganic("soso","w");
pageTracker._addOrganic("3721","name");
pageTracker._addOrganic("yodao","q");
pageTracker._addOrganic("vnet","kw");
pageTracker._addOrganic("sogou","query");
pageTracker._addIgnoredOrganic("麦包包");
pageTracker._addIgnoredOrganic("mbaobao");
pageTracker._addIgnoredOrganic("www.mbaobao.com");
pageTracker._setVar((isset(_ga_username) ? _ga_username : '非会员'));
pageTracker._trackPageview();

$('#a_add_favorites').bind("click", function()
{
pageTracker._trackEvent("网站操作", "收藏网站");
});
} catch(err) {
setTimeout(function(){
google_analytics();
}, 1000);
}
}

</script>

敦煌网首页、商品详情页:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-425001-1");
pageTracker._setDomainName(".dhgate.com");
pageTracker._setAllowHash("false");
pageTracker._trackPageview(location.pathname + location.search + escape(location.hash));
} catch(err) {}</script>

京东首页、商品详情页:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-2176661-1");
pageTracker._setDomainName("360buy.com");
pageTracker._addOrganic("soso", "w");
pageTracker._addOrganic("sogou", "query");
pageTracker._addOrganic("yodao", "q");
pageTracker._trackPageview();
</script>

走秀网首页、商品详情页:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-9540643-1");
pageTracker._initData();
pageTracker._setDomainName(".zoshow.com");
pageTracker._setAllowLinker(true);
pageTracker._trackPageview();
</script>

篱笆网首页:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-5496041-1");
pageTracker._setDomainName("liba.com");
pageTracker._initData();
pageTracker._trackPageview();
</script>

篱笆网商品详情页:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-5496041-1");
pageTracker._setDomainName("liba.com");
pageTracker._initData();
pageTracker._trackPageview(location.pathname + decodeURI(location.search));
</script>

钻石小鸟:
<script type="text/javascript" src="http://www.google-analytics.com/ga.js"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-97277-13");
pageTracker._addOrganic("soso","w");
pageTracker._addOrganic("sogou","query");
pageTracker._addOrganic("youdao","lq");
pageTracker._initData();
pageTracker._setDomainName(".zbird.com");
pageTracker._trackPageview();
</script>

博客大巴首页:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-2120146-1");
pageTracker._initData();
pageTracker._trackPageview();
document.onclick = function(e) {
e = e || event;
var el = e.target || e.srcElement;
if (el.tagName=='A' && e.button == 0 && el.href.match("http:\/\/") && el.target=="_blank") {
pageTracker._trackPageview("\/ad/" + window.location.href.replace("http:\/\/www.blogbus.com/", "") + el.href.replace("http:\/\/", "\/"));
        }
}
</script>

博客大巴频道页、文章页、文章列表页:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-1649222-2");
pageTracker._addOrganic("baidu","word");
pageTracker._addOrganic("baidu","wd");
pageTracker._addOrganic("soso","w");
pageTracker._addOrganic("vnet","kw");
pageTracker._initData();
pageTracker._trackPageview();
} catch(err) {}</script>

博客大巴注册、登录页:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-2120146-17");
pageTracker._trackPageview();
} catch(err) {}</script>

博客大巴搜索列表页:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-2120146-11");
pageTracker._trackPageview();

天极网:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var _ga = _gat._getTracker("UA-11613621-1");
_ga._setDomainName(".yesky.com");
_ga._addOrganic("soso","w");
_ga._addOrganic("3721","name");
_ga._addOrganic("yodao","q");
_ga._addOrganic("vnet","kw");
_ga._addOrganic("sogou","query");
_ga._trackPageview();
} catch(err) {}</script>

酷讯网:

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-4247795-5']);
  _gaq.push(['_setCustomVar','1','{$username}','{$cu_ip}','2']);
  _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>