- url(r'^reading/(?P<slug>[a-z0-9-]+)/$', views.BookUserDataView.as_view(), name='api_reading'),
- url(r'^reading/(?P<slug>[a-z0-9-]+)/(?P<state>[a-z]+)/$', views.BookUserDataView.as_view(), name='api_reading'),
- url(r'^username/$', views.UserView.as_view(), name='api_username'),
+ path('reading/<slug:slug>/',
+ piwik_track_view(views.BookUserDataView.as_view()),
+ name='api_reading'),
+ path('reading/<slug:slug>/<slug:state>/',
+ piwik_track_view(views.BookUserDataView.as_view()),
+ name='api_reading'),
+ path('username/',
+ piwik_track_view(views.UserView.as_view()),
+ name='api_username'),