Create google analytics profile by filtering using

2019-07-26 03:02发布

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>

Where box99 changes for each of the servers and user99@box99 changes for each user of each server

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?

1条回答
成全新的幸福
2楼-- · 2019-07-26 03:48

Custom filters don't yet support Custom Variables (stupidly, in my view).

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).

查看更多
登录 后发表回答