使用谷歌分析来跟踪单个网站中的多个公司

时间:2022-05-15 14:37:27

I've been tasked with implementing Google Analytics inside our (ASP.NET) application. Here is the scenario:

我的任务是在我们的(ASP.NET)应用程序中实现Google Analytics。这是场景:

  1. A single web-site on one domain
  2. 一个域上的单个Web站点

  3. Multiple companies all use this single website
  4. 多家公司都使用这个单一的网站

  5. Statistics need to be collected on a per company basis as well as the whole
  6. 统计数据需要按公司和整体收集

  7. Report access needs to be allocated on a per company basis or for all (Would also be nice if you could assign a range of reports to a specific user)
  8. 报告访问需要按公司或所有人分配(如果您可以为特定用户分配一系列报告,也会很好)

From the documentation available, I'm not sure whether to use:

从可用的文档中,我不确定是否使用:

Filters (Apply filter on virtual url to segment companies)

过滤器(在虚拟URL上应用过滤器以分割公司)

<script type="text/javascript">
   var pageTracker = _gat._getTracker("UA-12345-1");
   pageTracker._initData();
   pageTracker._trackPageview("/site.com/companyName/var1/var2");
</script>

Or Segments

<script type="text/javascript">
    var pageTracker = _gat._getTracker("UA-12345-1");
    pageTracker._initData();  
    pageTracker._trackPageview();
    pageTracker._setVar("companyName");
    pageTracker._setVar("var1");
    pageTracker._setVar("var2");
</script>

2 个解决方案

#1


Virtual addresses work fine with Google Analytics. You will see the content page there giving you a list like

虚拟地址可与Google Analytics一起使用。你会看到那里的内容页面给你一个列表

/companyA/welcome.aspx
/companyA/aboutus.aspx
/companyC/orderstatus.aspx
/companyB/welcome.aspx
/companyA/confirmorder.aspx
/companyC/welcome.aspx

/companyA/welcome.aspx /companyA/aboutus.aspx /companyC/orderstatus.aspx /companyB/welcome.aspx /companyA/confirmorder.aspx /companyC/welcome.aspx

You can then filter the list by company name, and it will just show "welcome" or "companyA" It will also show you the graph for content matching the query.

然后,您可以按公司名称过滤列表,它只显示“welcome”或“companyA”它还会显示与查询匹配的内容的图表。

The columns there will show; Page, Pageviews, Unique Pageviews, Avg. Time on Page, Bounce Rate, % Exit, $ Index.

那里的列将显示;页面浏览量,页面浏览量,独特网页浏览量,平均页面上的时间,跳出率,%退出,$指数。

Hope this helps.

希望这可以帮助。

#2


Both the ideas you posted have a similar flaw. They don't segregate access. In order to segregate access to each company's reports, you would have to create a separate code for each company. As such, you may have UA-12345-1, UA-12345-1, and UA-12345-1. The ASP.NET would be responsible for putting the right code in. This way, you can grant access to users for specific companies.

你发布的两个想法都有类似的缺陷。他们没有隔离访问权限。为了分离对每个公司报告的访问权限,您必须为每个公司创建单独的代码。因此,您可能拥有UA-12345-1,UA-12345-1和UA-12345-1。 ASP.NET将负责输入正确的代码。这样,您就可以为特定公司的用户授予访问权限。

The only problem with this is the lack of a unified report across all companies. I don't know that Analytics can do both the segregation and the unified reporting. Good luck!

唯一的问题是所有公司都缺乏统一的报告。我不知道Google Analytics可以同时进行隔离和统一报告。祝好运!

#1


Virtual addresses work fine with Google Analytics. You will see the content page there giving you a list like

虚拟地址可与Google Analytics一起使用。你会看到那里的内容页面给你一个列表

/companyA/welcome.aspx
/companyA/aboutus.aspx
/companyC/orderstatus.aspx
/companyB/welcome.aspx
/companyA/confirmorder.aspx
/companyC/welcome.aspx

/companyA/welcome.aspx /companyA/aboutus.aspx /companyC/orderstatus.aspx /companyB/welcome.aspx /companyA/confirmorder.aspx /companyC/welcome.aspx

You can then filter the list by company name, and it will just show "welcome" or "companyA" It will also show you the graph for content matching the query.

然后,您可以按公司名称过滤列表,它只显示“welcome”或“companyA”它还会显示与查询匹配的内容的图表。

The columns there will show; Page, Pageviews, Unique Pageviews, Avg. Time on Page, Bounce Rate, % Exit, $ Index.

那里的列将显示;页面浏览量,页面浏览量,独特网页浏览量,平均页面上的时间,跳出率,%退出,$指数。

Hope this helps.

希望这可以帮助。

#2


Both the ideas you posted have a similar flaw. They don't segregate access. In order to segregate access to each company's reports, you would have to create a separate code for each company. As such, you may have UA-12345-1, UA-12345-1, and UA-12345-1. The ASP.NET would be responsible for putting the right code in. This way, you can grant access to users for specific companies.

你发布的两个想法都有类似的缺陷。他们没有隔离访问权限。为了分离对每个公司报告的访问权限,您必须为每个公司创建单独的代码。因此,您可能拥有UA-12345-1,UA-12345-1和UA-12345-1。 ASP.NET将负责输入正确的代码。这样,您就可以为特定公司的用户授予访问权限。

The only problem with this is the lack of a unified report across all companies. I don't know that Analytics can do both the segregation and the unified reporting. Good luck!

唯一的问题是所有公司都缺乏统一的报告。我不知道Google Analytics可以同时进行隔离和统一报告。祝好运!