2013-07-03 52 views
1

我对Google Analytics(分析)有点新手,我一直试图弄清楚以下问题太久了。所以也许你可以帮助我。任何失败都将非常感激。在Google Analytics(分析)上使用多个自定义变量

我有一个网站,由Fork CMS提供,带有一个博客部分。在博客部分中,实际上有4个不同的博客,标有4个不同的类别。在页面上提供了“博客”四个链接,每个链接都显示一个页面,其中显示了一个类别的所有博客帖子。

这四个类别是'画家''美术摄影师','视觉艺术家'和'多媒体艺术家'。

我想什么在谷歌分析,看看是 1)所有流量的网站减去所有TRAFIC到博客上的概述, 2)所有流量的博客“画家”的概述, 3)博客'Fine Art Photographers'的所有流量概述, 4)博客'Visual Artists'的所有流量概述 5)博客'Multimedia Artists'的所有流量概述

我想我已经想出了如何做2-5,但我不知道第一个。我如何创建一个自定义变量,它将所有网站流量 - 2至5 ...?

我现在GAcode:

<script> 
    var _gaq = _gaq || []; 
    _gaq.push(['_setAccount', 'UA-xxxxxxxx-1']); 

    //custom variable for categories 
    _gaq.push(['_setCustomVar',1,'Painters','3'],     
    ['_setCustomVar',2,'Fine Art Photographers','3'],['_setCustomVar',3,'Visual   
    Artists','3'],['_setCustomVar',4,'Multimedia Artists','3']); 

    _gaq.push(['_trackPageview']); 

    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); 

    ga('create', 'UA-xxxxxxxx-1', 'mydomain.com'); 
    ga('send', 'pageview'); 
    </script> 

提前感谢!

回答

0

简短的回答是使用不同的范围,即:

_gaq.push(['_setCustomVar',1,'Overview',2],  

参考:

scope

GA Link

相关问题