Skip to content

Commit

Permalink
add description in ga_sender
Browse files Browse the repository at this point in the history
  • Loading branch information
郭靖 committed Jan 28, 2011
1 parent 6348eed commit 5bf0f1c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ga_sender/ga_sender.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -119,5 +119,7 @@ def send_to_ga(environ):
g = GoogleAnlayticsMobile('UA-15296817-5', 'www.jguoer.com', environ) g = GoogleAnlayticsMobile('UA-15296817-5', 'www.jguoer.com', environ)
send_request_to_google_analytics(g.get_imgurl(), environ) send_request_to_google_analytics(g.get_imgurl(), environ)


## e is environ dict
## this sample is send ga by reading web log
e = {'domain': 'www.jguoer.com', 'protocol': 'HTTP/1.1', 'uid': '39454209', 'status_code': '200', 'url': '/?session=3fd90546_39454209', 'ip': '122.192.166.136', 'bid': '4979797d', 'time': '2011-1-28 14:40:35 +0800', 'page_size': '3821', 'referer': 'http://www.jguoer.com/?session=6acf607a_39454209', 'user_agent': 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; zh-cn) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7', 'process_time': '0', 'method': 'GET'} e = {'domain': 'www.jguoer.com', 'protocol': 'HTTP/1.1', 'uid': '39454209', 'status_code': '200', 'url': '/?session=3fd90546_39454209', 'ip': '122.192.166.136', 'bid': '4979797d', 'time': '2011-1-28 14:40:35 +0800', 'page_size': '3821', 'referer': 'http://www.jguoer.com/?session=6acf607a_39454209', 'user_agent': 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; zh-cn) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7', 'process_time': '0', 'method': 'GET'}
send_to_ga(e) send_to_ga(e)

0 comments on commit 5bf0f1c

Please sign in to comment.