5

We use GA for tracking and part of the tracking involves storing the __utmz cookie value in our DB. I have a problem in understanding why is CF 10 not able to parse the __utmz cookie.

CF10 is not parsing or properly retrieving the value of __utmz cookie Or just about any cookie value that has an 'equal (=)' sign in it other than the CFGLOBALS.

Here is the screen shot of the issue (using CFDUMP of COOKIE scope) -

What it should look like -

適切な Google アナリティクス Cookie の読み取り

What it is looking like -

Improper Google Analytic cookie read

Server Config: CF10, IIS 7.5, Win 2k8

4

2 に答える 2

0

私はちょうどこの問題に遭遇しました。CF8 で動作していたコードの一部が CF10 で動作しなくなりました。生の Cookie 値を取得するために、この関数を作成しました。

<cffunction name="GetRawCookie" output="false" returntype="string">
    <cfargument name="cookieName" type="string" required="true">
    <cfset local.cookies = GetHttpRequestData().headers.cookie>
    <cfset local.cookieValue = "">
    <cfset local.match = reFindNoCase("(?:^|;)\s*" & arguments.cookieName & "=([^;]+)", local.cookies, 1, true)>
    <cfif local.match.pos[1] gt 0>
        <cfset local.cookieValue = mid(local.cookies, local.match.pos[2], local.match.len[2])>
    </cfif>
    <cfreturn local.cookieValue>
</cffunction>
于 2014-01-16T17:46:48.543 に答える