使用谷歌Analytics(分析)来追踪客户端JavaScript和服务器端跟踪调用同一个会话? [英] Using Google Analytics to track the same session in client javascript and server side tracking calls?

查看:88
本文介绍了使用谷歌Analytics(分析)来追踪客户端JavaScript和服务器端跟踪调用同一个会话?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们实行的是第三方支付系统进入我们的网站(巴克莱CPI)。我们要使用谷歌分析跟踪,其中付费用户从如来;关键字,电子邮件广告等。然而,巴克莱CPI通过服务器到服务器的HTTP请求,不与谷歌分析code普通网页返回付款授权的结果。这打破了连锁分析,我们失去识别访问者的客户端cookie。

We are implementing a 3rd party payment system into our site (Barclays CPI). We want to use Google Analytics to track where paying customers came from eg; keywords, email campaigns etc. However, the Barclays CPI returns the payment authorisation result via a server-to-server http request, not a normal web page with google analytics code. This breaks the analytics chain, we lose the client cookie that identifies the visitor.

在巴克莱CPI确认屏幕,用户可以$ P $的PSS的继续按钮返回到我们的网站,我们的可以把在JavaScript跟踪code,但pressing的继续按钮的可选即可。我们需要100%的预算准确的分析统计,规划和报告。

On the Barclays CPI confirmation screen the user can press a Continue button to return to our site, where we could put javascript tracking code in, but pressing the Continue button is optional. We need 100% accurate analytics stats for budgeting, planning and reporting purposes.

服务器端跟踪呼叫救援?

我知道,它有可能使服务器端跟踪调用,例如; http://www.diaryofaninja.com/projects/details/ga-dot-net ,但我想在服务器端链接跟踪到同一个浏览器会话分析来电,所以我们知道那里的付费用户有来自并且可以通过付款前该网站追踪了他的去路。

I know that it is possible to make server side tracking calls, eg; http://www.diaryofaninja.com/projects/details/ga-dot-net, but I want to link the server side tracking calls to the same browser analytics session so we know where the paying customer has come from and can trace his path through the site prior to payment.

这是个好主意,把所有的谷歌cookie的用户到第三方网站之前的值,然后以某种方式将它们连接到服务器端分析称,这样的付款授权结果连接到同一个浏览器会议?这可能吗?

Is it a good idea take the value of all the google cookies just before the user went to the 3rd party site, and then somehow attach them to the server side analytics call so that the payment authorisation result is connected to the same browser session? Is this possible?

感谢

推荐答案

得到这个工作。从谷歌分析移动作为基可以存储从浏览器会话的原始UTMA和utmz Cookie值,并将它们存储在可以检索浏览器以外的方式。就我而言,订单ID。然后,你需要做一个__utm.gif图像请求谷歌浏览器之外的跟踪。为了保持同样的分析会话细节,原来的用户,得到存储UTMA和utmz值,并把它们用于在将__utm.gif请求utmcc参数。你需要给url EN code中的第一个值如;

Got this working. Using ga.aspx from the Google Analytics for mobile as a base you can store the original utma and utmz cookie values from the browser session and store them in a way you can retrieve outside of the browser. In my case, the order id. Then you need to make a __utm.gif image request to google to track outside of the browser. To keep the same analytics session details as the original user, get the stored utma and utmz values and put them in the utmcc parameter for the __utm.gif request. You'll need to url encode the values first eg;

url += "&utmcc=" + Uri.EscapeDataString( utma + utmz) 

这篇关于使用谷歌Analytics(分析)来追踪客户端JavaScript和服务器端跟踪调用同一个会话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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