You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read this blog to track single-page website, but i do not know how to use setGenerationTimeMs() to track new page view generation time with different url and where these code should it be placed in the index.html? Should it be located before piwik traditional tracking code ? @Sija@nbezzala
if you can reply, i will be grateful your for help
@wei1215583760 would you mind asking your questions in our forum: https://forum.piwik.org
This is an issue tracker and should be used for reporting bugs or suggesting new features, not for asking questions.
But I just do not know where to place these code
var currentUrl = location.href;
window.addEventListener('hashchange', function() {
_paq.push(['setReferrerUrl', currentUrl]);
currentUrl = '' + window.location.hash.substr(1);
_paq.push(['setCustomUrl', currentUrl]);
_paq.push(['setDocumentTitle', 'My New Title']);
It depends on your usage of AngularJS and how pages are loaded. I would include that JS right after the JS that loads new page content. The generation time needs to be calculated by your JS and needs to be set for _paq.push(['setGenerationTimeMs', 0]);
I have read this blog to track single-page website, but i do not know how to use setGenerationTimeMs() to track new page view generation time with different url and where these code should it be placed in the index.html? Should it be located before piwik traditional tracking code ?
@Sija @nbezzala
if you can reply, i will be grateful your for help
0b1fa1c386f3b04b97c4439fff75f333
https://piwik.org/blog/2017/02/how-to-track-single-page-websites-using-piwik-analytics/
The text was updated successfully, but these errors were encountered: