Commit 4457fcaf authored by fred's avatar fred
Browse files

notify piwik of dynamic page changes

parent e4e8aca0
......@@ -21,6 +21,16 @@ $(function() {
$main.empty().append(new_content);
var newTitle = html.match(/<title>(.*?)<\/title>/);
if(newTitle){document.title = newTitle[1].trim().decodeHTML();}
if (typeof (Piwik) == 'object') {
piwikTracker = Piwik.getAsyncTracker();
if (typeof (piwikTracker.trackPageView) == 'function') {
piwikTracker.setDocumentTitle(document.title);
piwikTracker.setCustomUrl(window.location.href);
piwikTracker.trackPageView();
}
}
/*
Quite UGLY but needed for styling the whole body with ID
Feel free to correct and find a better way
......
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