简体   繁体   English

跟踪同一页面的多个部分 - Google Analytics

[英]Track multiple sections of same page - Google Analytics

I have a page with a form. 我有一个表格的页面。 The form has four sections that you go through before you submit it, and these are all set out as tabs on the same page. 表单有四个部分,您在提交之前会经历这些部分,这些部分都在同一页面上作为选项卡进行设置。 I currently have google analytics tracking the page, but I was wondering if I could get it to track each section as the user reaches it/clicks on it. 我目前有谷歌分析跟踪页面,但我想知道是否可以让它跟踪每个部分,因为用户到达它/点击它。 Is this possible? 这可能吗?

Thanks in advance :) 提前致谢 :)

Set up virtual pageviews. 设置虚拟综合浏览量。

In the javascript click event for the form section add (caps added for clarification): 在表单部分的javascript click事件中添加(添加了上限以便澄清):

_gaq.push(['_trackPageview', '/FORM-PAGE-OR-NAME/SECTION-NUM']);

with /FORM-PAGE-OR-NAME/SECTION-NUM being whatever you want to show up in Google Analytics and with NUM being different for each section. /FORM-PAGE-OR-NAME/SECTION-NUM是您想要在Google Analytics中显示的内容,而每个部分的NUM都不同。

The submit can also be a pageview and used as the goal destination page with the sections as the steps: 提交也可以是综合浏览量,并用作目标目标页面,其中的部分为步骤:

 _gaq.push(['_trackPageview', '/FORM-PAGE-OR-NAME/SUBMIT']);

You can now see in the goal funnel where people may have bailed on your form before submitting. 您现在可以在目标渠道中看到人们可能会在提交之前保留您的表单。

Identical URLs across multiple steps 跨多个步骤的相同网址

However, advanced users may want to track visitors' progress through a Funnel with the same URL for each step. 但是,高级用户可能希望通过漏斗跟踪访问者的进度,并为每个步骤使用相同的URL。 To do this, you need to modify your tracking code to create a virtual pageview for each step in the sequence that you want to track. 为此,您需要修改跟踪代码,以便为要跟踪的序列中的每个步骤创建虚拟综合浏览量。

You could also use events: 您还可以使用事件:

_gaq.push(['_trackEvent', 'FORM-NAME', 'SECTION-NUM']);

Event Tracking 事件追踪

With this you could compare how many events were fired for each section. 有了这个,您可以比较每个部分触发的事件数。

Whether you use virtual pageviews or events will depend upon how you want to use the data in GA. 您是否使用虚拟综合浏览量或事件取决于您希望如何在GA中使用数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM