通过使用自定义变量进行过滤来创建Google Analytics(分析)配置文件 [英] Create google analytics profile by filtering using a custom variable
问题描述
我需要使用Google Analytics(分析)进行配置的10台服务器(最终将为数百台).在每台服务器上,我都有普通的带有自定义变量的原始跟踪代码,如下所示:
I have 10 servers (will eventually be hundreds) that I need to profile using google analytics. On each of these servers I have plain vanilla tracking code with custom variables as follows:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXXX-1']);
_gaq.push(['_setDomainName', 'cloud.nimbox.com']);
_gaq.push(['_setCustomVar', 1, 'box', 'box99', 3]);
_gaq.push(['_setCustomVar', 2, 'user', 'usr99@box99', 3]);
_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>
每个服务器的box99
发生变化,而每个服务器的每个用户的user99@box99
发生变化
Where box99
changes for each of the servers and user99@box99
changes for each user of each server
我正在获取主配置文件cloud.nimbox.com
上的所有信息,但是我想为每个customVar
box
创建一个独立的/已过滤的配置文件;即box01
的配置文件,box02
的配置文件,它们是通过过滤原始的cloud.nimbox.com
创建的.我一直在尝试使用不同的过滤元素,但均未成功.有任何想法吗?
I'm getting all the information on the master profile cloud.nimbox.com
but I would like to create an independent/filtered profile for each customVar
box
; i.e., a profile for box01
, a profile for box02
, which are created by filtering the original cloud.nimbox.com
. I've been trying with different filtering elements without success. Any ideas?
推荐答案
自定义过滤器尚不支持自定义变量(在我看来,这很愚蠢).
Custom filters don't yet support Custom Variables (stupidly, in my view).
您将需要使用其他数据点另外传递该信息;用户定义变量(自定义变量的前身)可能是一种解决方案,因为它是过滤的选项. User Defined Variable的缺点是您一次只能设置一个,但是似乎可以很好地用于存储服务器名称,然后保留两个当前的自定义变量用于其他数据操作.
You'll need to pass that information additionally using a different data point; User Defined Variable (the predecessor to Custom variables) could be a solution, as it is an option for filtering. The drawback with User Defined Variable is that you can only set one at a time, but that seems like it will work fine for storing the server name, and then keep both of your current custom variables for other data operations.
或者,您可以有一个配置文件,并使用高级细分"(它确实支持按自定义变量值进行细分).
Alternately, you could have a single profile and use Advanced Segmentation (which does support segmenting by custom variable value).
这篇关于通过使用自定义变量进行过滤来创建Google Analytics(分析)配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!