具有页面浏览量和时间相关指标的引导模式分析 [英] Analytics on a bootstrap modal with pageview and time related metrics

查看:20
本文介绍了具有页面浏览量和时间相关指标的引导模式分析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个页面(让我们将其命名为概览页面),其中包含大量项目图像,单击即可打开包含有关该项目的更多信息的引导 (v3) 模式.每个项目也有自己的页面(单页).

I have a page (let's name it the overview page) with a lot of images of projects that on a click open a bootstrap (v3) modal with more info about that project. Each project also has its own page (single page).

当用户使用 Google(通用)分析打开模态时,我想跟踪项目的综合浏览量.现在,我打算通过将以下代码添加到概览页面上的每个链接来执行此操作:

I'd like to track pageviews for the projects when a user opens the modal with Google (universal) analytics. Now I'm planning on doing this by adding the following code to each link on the overview page:

onClick="ga('send','pageview','/url-to-project-page');"

我希望这能正常工作,因为我在其他关于跟踪 AJAX 调用浏览量的帖子中看到过这种方法.

I expect this works fine since I've seen this method in other posts regarding tracking pageviews on AJAX calls.

但我想知道这如何影响与时间相关的指标,例如页面上的平均时间,因为分析无法知道模态何时关闭(与离开单个页面相同).

But I'm wondering how this affects time related metrics like average time on page, since analytics can't know when the modal is closed (the same as leaving a single page).

是否有人知道这些指标是否与普通的单页浏览量相当,或者指标的某些部分(我猜是与时间相关的指标)是否会因为分析无法跟踪它们而关闭?

Does anyone know if the metrics will be comparable to a normal single page view, or will some parts of the metrics (I'm guessing time related metics) be off because analytics isn't able to track them?

推荐答案

如果我理解正确,您希望将模态的打开情况作为项目页面的综合浏览量进行跟踪.这可以通过您刚才所说的来完成,但在我看来,使用直接 URL 是不明智的.您最好改用虚拟 URL(VURL).在此处详细了解虚拟网址.

If I understand it right, you want to track the opening of the modal as a pageview of the projects page. This can be accomplished with what you just said, but using a direct URL would be unwise in my humble opinion. You would be better off using a virtual URL(VURL) instead. Read more about virtual URLs here.

Universal Analytics(UA) (analytics.js) 中也提供了它,当您发送如上所述的综合浏览量时,您是在强制 GA 报告指定网址的综合浏览量.你的代码,(1) ga('send','pageview','/url-to-project-page'); 会起作用.

It is also available in Universal Analytics(UA) (analytics.js) and when you are sending such a pageview as you mentioned above, you are forcing GA to report a pageview of the specified URL. Your code, (1) ga('send','pageview','/url-to-project-page'); will work.

在UA中,ga('send','pageview');用于发送当前的pageview.如果您需要发送虚拟综合浏览量(或尚未发生但您希望被记录的综合浏览量),您还可以将其发送为:(2)

In UA, ga('send','pageview'); is used to send the current pageview. If you need to send a virtual pageview (or a pageview which has not happened but you want to be recorded), you can also send it as: (2)

ga('send', 'pageview', {
  'page': '/url-to-project-page'
});

或作为(3)

ga('set', 'page', '/url-to-project-page');
ga('send', 'pageview');

或作为(4)

ga('send', {
  'hitType': 'pageview',
  'page': '/url-to-project-page'
});

实现 1、2 和 4 相同,但实现 3 不同.

The implementations 1, 2 and 4 are same, but 3 is different.

您可以在此处此处这里.

这会影响您的综合浏览量(您会看到增加),但不会增加您的访问量(因为没有用户可以登陆"虚拟页面(除非您让他们这样做)).这会影响您的跳出率,但它不会关闭",因为如果他们以模式查看您的项目,则意味着他们已经与您的网站进行了交互,因此不应将它们标记为跳出,这就是当您发送虚拟综合浏览量时发生.

This would affect your pageviews count (you will see an increase), but would not increase your visits (as no user can 'land' on a virtual page (unless you make them do so)). This will impact your bounce rates, but it will not be 'off' in the sense that if they view your project in a modal, it means they have interacted with your site hence they should not be marked as a bounce, and this is what happens when you send a virtual pageview.

尽管您想要做的事情是正确的,但您的实施无法区分模态视图和实际项目页面视图.我会通过以一种有意义且语义化的方式组织 VURL 结构来克服这个问题.例如,我不会发送与您的项目单页 url 直接对应的 VURL,而是将其发送如下: ga('send','pageview','/virtual/modal/url-to-project-页面');

Though what you wanted to do was correct, your implementation suffers from not being able to differentiate modal views from actual project page views. I would overcome this by organising the VURL structure in a way that it makes sense and is semantic. As an example, instead of sending a VURL which corresponds directly to your project single page url, I would send it like: ga('send','pageview','/virtual/modal/url-to-project-page');

通过这种方式,您可以通过从网页浏览中为 /virtual 添加一个排除过滤器来过滤掉 VURL,这样就不会显示虚拟网页浏览.此外,您可以使用 /url-to-project-page 查看项目页面的总浏览量.此外,您还可以使用 /virtual/modal 查看因打开模态框而产生的所有虚拟网页浏览量.

This way, you can filter out the VURLs by adding an exclude filter for /virtual from pageviews so that virtual pageviews are not shown. Also, you can view total pageviews for project pages by using /url-to-project-page. Also, you can view all virtual pageviews resulting from the opening of modals by using /virtual/modal.

页面停留时间和浏览量/访问量以及此类指标会发生变化,但这取决于您如何看待它,无论是错误还是准确性的提高.记录虚拟网页浏览的页面停留时间,直到用户导航到新页面,或发送报告 VURL 的请求,或直到会话关闭(以先发生者为准).

Time on Page and Pageviews/Visit and such metrics will change, but it depends on how you see it, whether as an error or improvement in accuracy. Time on Page is recorded for the virtual pageviews until the user navigates to a new page, or a request to report a VURL is sent, or until the session is closed (whichever happens first).

希望有帮助!:)

这篇关于具有页面浏览量和时间相关指标的引导模式分析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆