Google Analytics(分析)跟踪在一页结帐中退出 [英] Google analytics track exits within a one-page checkout

查看:121
本文介绍了Google Analytics(分析)跟踪在一页结帐中退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个名为NopCommerce的电子商务系统,该系统实现了一页结帐系统.该页面要求用户在付款前填写帐单地址/送货地址等详细信息.

I'm using an ecommerce system called NopCommerce that implements a one page checkout system. This page asks users to fill out details like billing address / shipping address etc before taking payment.

页面使用ajax保存这些详细信息,因此URL不会更改,没有内部锚等标记进度.

The page uses ajax to save these details so the URL doesn't change, there's no internal anchors etc to mark progress.

有人知道是否有可能使用Google Analytics(分析)来找出人们在此页面上的退出位置?

Does anyone know if it's possible using Google analytics to find out where on this page people are exiting?

我知道有退出报告,但它们仅引用页面,而不是页面中的区域.

I know there are exit reports but they just refer to pages, not areas within pages.

这有可能吗?如果可以的话,如何实现呢?

Is this possible and if so how is it implemented?

推荐答案

我不了解Nopcommerce,但是在演示,似乎单个步骤是使用jquery通过ajax加载的,这意味着您可以使用全局ajax事件处理程序,以便为每个结帐步骤发送虚拟综合浏览量:

I do not know Nopcommerce, but looking at the demo it seems the individual steps are loaded via ajax using jquery, which means you can use global ajax event handlers to send a virtual pageview for each checkout step:

$(document).ajaxSuccess(function(event, xhr, settings ) {
  url = settings.url.replace("https://mydomain.com","");
  ga('send', 'pageview', url);
});

未经测试,但是我对magento单页结帐使用了类似的功能,因此我确定它可以正常工作(也许需要稍作调整).

Untested, but I'm using something similar for the magento onepage checkout so I'm certain it will work (maybe needs a little tweaking).

在全局ajax处理程序回调中,settings.url存储已通过ajax调用的URL,并且由于您传递的是Analytics(分析)虚拟网页浏览器的路径,而不是完整URL,因此您需要从以下位置删除协议和主机名settings.url.

In the global ajax handler callback settings.url stores the url that has beed called via ajax and since you pass a path to an Analytics virtual pageview, not the full url, you'd need to remove the protocol and host name from settings.url.

这篇关于Google Analytics(分析)跟踪在一页结帐中退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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