在ASP +中跟踪像素获取cookie值

时间:2014-09-23 10:38:45

标签: cookies asp-classic cross-domain

所以这是我的情况:

用户访问www.a.com,其中设置了cookie:

$.cookie('panelcookie', userid, {path: '/' });

此用户现在访问www.b.com,我们的跟踪像素为

<img src="http://www.a.com/trackpixel.asp" width=1 height=1>

,像素应该将该用户ID与其他信息一起写入日志(以下是我迄今为止提出的内容):

<% 


Const ForAppending = 8
 Const Create = true
 Dim FSO
 Dim TS
 Dim Panelcookie 
 Dim MyFileName
 Dim strLog
 Dim cMyValue 

 MyFileName = Server.MapPath("asptrack.txt")


  Set FSO = Server.CreateObject("Scripting.FileSystemObject")
 Set TS = FSO.OpenTextFile(MyFileName, ForAppending, Create)


 ' Store all the required information in a string Called strLog

 strLog = "<br><P><B>" & NOW() & "</B> "
 strLog = strLog & Request.ServerVariables("REMOTE_ADDR") & " "
 strLog = strLog & Request.ServerVariables("HTTP_REFERER") & " "
 strLog = strLog & "User has cookie? " & Request.Cookies("panelcookie") & " " 
 strLog = strLog & Request.ServerVariables("HTTP_USER_AGENT") & "<BR>"



 ' Write current information to Log Text File.

 TS.write strLog
 TS.Writeline ""


%>

我如何做到这一点?

0 个答案:

没有答案