Firefox “Bad request” caused by corrupt google tracking cookie

落爺英雄遲暮 提交于 2019-12-06 10:22:46

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".

I've seen this before. I don't know if there's a common cause, but i'll at least explain the cause (and the fix) in the one instance i'm familiar with.

Using third-party ad tracking systems cause a Site's visitors to be passed through redirection URLs--for instance, Atlas Search, DoubleClick, SEM Director, or here 'Salesforce', which i am assuming is analogous, but you'll have to verify that. Redirection URLs can break the GA tracking parameters appended to your landing page URLs.

Suppose your landing page URL was http://www.onlinefun.com/?source=google&medium=ppc&campaign=shoes. When that URL is added to a third-party tracking system for redirection, of course, it becomes the query parameter for the redirect URL, so, something like: http://www.redirectdomain.com?http://www.onlinefun.com/?source=....

This URL now has two '?' in it--a problem because you're only allowed one (or at least you are only allowed one to indicate that a query string follows).

Just as in your Question, the first time i saw the behavior, most browsers were unaffected. I had no idea why not all browsers returned a 400, though we were able to fix the problem. The initial quick fix was to substitute a '#' for the second '?' so at least the URL would process. Clearly, the more stable solution is to use encoded landing-page URLs as described in this w3 schools tutorial.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!