【问题标题】:Google App Engine: traffic sourceGoogle App Engine:流量来源
【发布时间】:2012-12-14 22:32:14
【问题描述】:

有没有办法确定 Google App Engine 网站的流量来自哪里?例如用户之前访问的网站?

谢谢。

【问题讨论】:

    标签: google-app-engine


    【解决方案1】:

    来自How to implement hotlinking prevention in Google App Engine

    def get(self):
        referer = self.request.headers.get("Referer")
        # Will be None if no referer given in header.
    

    我刚刚在console 中尝试过这个:

    import os
    os.environ['HTTP_REFERER']  
    

    它返回了

    'http://con.appspot.com/console/'
    

    在使用之前先检查它是否存在。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-05-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-15
      • 2021-11-11
      • 1970-01-01
      相关资源
      最近更新 更多