Firefox“错误的请求”腐败的谷歌跟踪cookie造成的 [英] Firefox "Bad request" caused by corrupt google tracking cookie

查看:201
本文介绍了Firefox“错误的请求”腐败的谷歌跟踪cookie造成的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的网站存在一个问题,有些Firefox用户在访问我们的网站时收到了不良请求的消息(没有其他的,只是错误的请求!)



这可能是由于谷歌跟踪cookie损坏,可能是 __ utmz (一个人轮流删除谷歌cookie, )



我们的网站使用以下的JavaScript跟踪代码:

  var gaJsHost =((https:== document.location.protocol)?https:// ssl。:http:// www。); 
document.write(unescape(%3Cscript src ='+ gaJsHost +google-analytics.com/ga.js'type ='text / javascript'%3E%3C / script%3E));

尝试{
var pageTracker = _gat._getTracker(UA - **********);
pageTracker._trackPageview();
} catch(err){}

偶尔我们也使用这个来创建一个不同的伪-URL跟踪谷歌分析当一个表格已完成:

  pageTracker._trackPageview('{$ smarty.const.CONST_PAGE_URL }/完成'); 

{$ smarty.const.CONST_PAGE_URL} 只是一些模板代码来输出真实的当前页面url。

最后,可能不相关,但对于CRM中的交叉跟踪,我们也使用Salesforce跟踪从 https://lct.salesforce.com/sfga.js 加载,这是从在我们的页面页脚这样的Javascript:

  __ sfga(); 

我从Firefox 3.5.7的用户那里得到了这个问题的报告 - 我没有了解其他人(除了使用Firefox)。有谁知道什么可能会导致这种情况,如果有任何方法来阻止/避免它?

非常感谢 - BTW堆栈溢出岩石,我经常使用它:O)我们遇到了同样的问题,但是这是由于在电子邮件的主题行中使用电子邮件活动和非标准字符(扩展连字符),然后将其添加到用于访问网站的utm_term变量中。这是由Google Analytics(分析)在网站上放入__utmz Cookie。例如,使用Firefox的Web Developer插件显示坏字符。


We have an issue on our site whereby some Firefox users are receiving a "Bad Request" message when they visit our site (nothing else, just the words "Bad Request"!)

This would appear to be due to a corrupt google tracking cookie, possibly __utmz (one person delete the google cookies in turn and once that one was removed the site came back to life.)

Our website uses this Javascript google tracking code:

    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

    try {
        var pageTracker = _gat._getTracker("UA-**********");
        pageTracker._trackPageview();
    } catch(err) {}

Occasionally we also use this to create a different pseudo-URL to track in google analytics when a form has been completed:

  pageTracker._trackPageview('{$smarty.const.CONST_PAGE_URL}/complete');

{$smarty.const.CONST_PAGE_URL} is just a bit of template code to output the real, current page url.

Finally, probably not relevant but, for cross tracking in our CRM, we also use Salesforce tracking loaded from https://lct.salesforce.com/sfga.js which is kicked off from Javascript in our page footer like this:

__sfga();

I have had a report of this issue from a user of Firefox 3.5.7 - I don't know about the others (except they were using Firefox). Does anyone know what might cause this and if there is any way to stop/avoid it?

Many thanks - BTW stack overflow rocks I use it often :O)

Ben

解决方案

We experienced the same problem, but it was due to an email campaign and a "non-standard" character (extended hyphen character) being used in the subject line of the email that was then added into to the utm_term variable, used to access the web site. This was put into the __utmz cookie by Google Analytics on the site. Viewing your cookies using for example Firefox's Web Developer plug-in showed the "bad character".

这篇关于Firefox“错误的请求”腐败的谷歌跟踪cookie造成的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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