uid — defines the User ID for this request. User ID is any non empty
unique string identifying the user (such as an email address or a
username). To access this value, users must be logged-in in your
system so you can fetch this user ID from your system, and pass it to
Piwik. The User ID appears in the visitor log, the Visitor profile,
and you can Segment reports for one or several User ID (userId
segment). When specified, the User ID will be "enforced". This means
that if there is no recent visit with this User ID, a new one will be
created. If a visit is found in the last 30 minutes with your
specified User ID, then the new action will be recorded to this
existing visit.
这个piwik库用于pythonweb服务器,比如Django。除非你计划在你的虚拟机上运行一个web服务器,否则它是没有用的。这就是说,运行一个网络服务器来向piwik发送曲目似乎有些过头了。在
Piwik只是在向服务器发送数据时调用URL。它不使用POST,只使用GET。因此,使用一个将调用URL:https://docs.python.org/2/howto/urllib2.html的脚本在Python中复制调用是非常简单的
实际的piwik url可以简单到:
这将在piwik数据库中启动一个会话。ID Site是您正在跟踪的网站的piwik ID。在
Source
可以使用此会话跟踪器传递其他变量。在
我建议在uid参数中传递用户id,如果需要其他自定义变量,也可以在\u cvar中传递。在
Source
希望这有帮助。在
相关问题 更多 >
编程相关推荐