Commit ca6497db authored by Jean Michel Rouly's avatar Jean Michel Rouly
Browse files

Added piwik tracking to redirections as well.

parent e62409ab
......@@ -97,7 +97,13 @@ def redirection(request, short):
except URL.DoesNotExist:
raise Http404("Target URL not found.")
target =
url.clicks = url.clicks + 1
return redirect( target )
from piwikapi.tracking import PiwikTracker
from django.conf import settings
piwiktracker = PiwikTracker(settings.PIWIK_SITE_ID, request)
piwiktracker.do_track_page_view('Redirect to %s' %
return redirect( )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment