Navigation tracking

With the Ownpage JS library

The simplest method is to use the Ownpage JS library :

<script type="text/javascript">
(function(){
    function loadOwnpageScript(e){var t="https://script.ownpage.fr/v1/",a=document.createElement("script"),n=document.getElementsByTagName("script")[0];a.type="text/javascript",a.defer=1,a.async=1,a.src=t+"ownpage.js",a.onload=e,a.readyState?a.onreadystatechange=function(){("loaded"==a.readyState||"complete"==a.readyState)&&(a.onreadystatechange=null,e&&"function"==typeof e&&e())}:a.onload=function(){e&&"function"==typeof e&&e()},n.parentNode.insertBefore(a,n)}

    loadOwnpageScript(function () {
       Ownpage.trackPage(CLIENT_TRACKING_KEY, USER_ID);
    });
})();
</script>

Insert this code on the pages-articles by replacing :

This tracking code does the following :

Without the Ownpage JS library

The Ownpage API can be directly called :

POST https://api.ownpage.fr/v1/collect/hits

The request body describes the navigation action :

{
    "tracking_key" : "abcdef",
    "url" : "http://www.canardmag.fr/article-123.html",
    "user" : "123456",
    "cookie" : "abcdefghijk"
}

With :

Note : cookies and mobile applications :

Cookies are note available on mobile applications. Replace it with the following ids :

Check the tracking

To check the tracking, please use our Chrome extension.

Missing Ownpage tracking

Tracking absent

Tracking ok

Tracking en place