使用 Google Analytics 对第 3 方(场外)购物车进行转化跟踪
我有以下场景:
用户有一个现场购物车,他可以在其中添加产品。
当用户单击结帐时,他会被发布到一个脚本,该脚本计算到场外购物车的购买链接并使用 Location 标头将他重定向。
用户继续在第 3 方网站中付款。
我需要的是在整个过程中跟踪用户。
_gaq.push(['_link', this.href]);
用于直接链接,_gaq.push(['_linkByPost', this]);
用于表单帖子,但是我应该使用什么来进行标题重定向?
(Google Analytics 在长达 48 小时内更新,我不能仅通过反复试验来实现此目的。)
谢谢, 阿林
I have the following scenario:
The user has an on-site shopping cart where he adds products.
When the user clicks on checkout he is POSTed to a script that computes the buy link to an off-site shopping cart and redirects him with the Location header.
The user continues with the payment in the 3rd party website.
What I need is to track the user throughout this process.
_gaq.push(['_link', this.href]);
is for direct links and _gaq.push(['_linkByPost', this]);
is for form posts, but what should I use for header redirects?
(Having that Google Analytics updates in up to 48 hours I can't just use trial and error for this.)
Thank you,
Alin
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过一些调查和测试,我发现两个站点上都有
_gaq.push(['_setAllowLinker', true]);
就足够了,并且链接信息包含在附加的 GA 设置的所有 cookie 中到请求 URL,以便将它们发送到第 3 方页面。因此,如果您的重定向 URL 是
http://www.example.org/shoppingcart/
那么您需要读取__utma
、__utmb
、< code>__utmc 和__utmz
并附加它们,以便您得到http://www.example.org/shoppingcart/?__utma=...&__utmb=.. .&__utmc=...&__utmz=...
。目标页面上的 GA 脚本将看到这些 GET 参数并使用它们来识别访问者。对于
_link
,脚本通过将这些参数添加到提供的 href 中来为您完成此操作,并且还会加载计算出的 URL。在第二种情况下,_linkByPost
它将参数附加到表单的操作属性中。After some investigation and tests I found that it is enough to have
_gaq.push(['_setAllowLinker', true]);
on both sites and the linking information consists in all the cookies set by GA being appended to the request URL so they are sent to the 3rd party page.So if your redirect URL is
http://www.example.org/shoppingcart/
then you need to read the__utma
,__utmb
,__utmc
and__utmz
and append them so that you gethttp://www.example.org/shoppingcart/?__utma=...&__utmb=...&__utmc=...&__utmz=...
. The GA script on the target page will see these GET parameters and use them to identify the visitor.In the case of
_link
the script does this for you by adding those parameters to the href supplied and it also loads that computed URL. In the second case, of_linkByPost
it appends the parameters to the action attribute of the form.