开发者

Tracking Django Redirect App with Google Analytics

开发者 https://www.devze.com 2023-01-07 15:45 出处:网络
I\'m using the Django Redirect app (http://docs.djangoproject.com/en/ dev/ref/开发者_如何学Gocontrib/redirects/) but I\'d like to have Google Analytics

I'm using the Django Redirect app (http://docs.djangoproject.com/en/ dev/ref/开发者_如何学Gocontrib/redirects/) but I'd like to have Google Analytics track the urls that's I'm redirecting. Is there an standard way to do something like this without hacking the Django core?


Roll you're own redirect middleware, an add on a paraemeter to the query string like ?redirect_from=whatever.

Then include a piece of javascript that looks for this parameter and fires off the trackPageView described at http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55529

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号