- url(r'^like/(?P<slug>[a-z0-9-]+)/$', views.LikeView.as_view(), name='social_api_like'),
- url(r'^shelf/(?P<state>[a-z]+)/$', views.ShelfView.as_view(), name='social_api_shelf'),
+ path('like/<slug:slug>/',
+ piwik_track_view(views.LikeView.as_view()),
+ name='social_api_like'),
+ path('shelf/<slug:state>/',
+ piwik_track_view(views.ShelfView.as_view()),
+ name='social_api_shelf'),