src/page-metadata.js
function getPageMeta() {
        var data = detectFeatures();

        data.title = document.title;
        data.url = window.location.href;
        data.path = document.location.pathname;
        data.referrer = document.referrer;
        data.url_section = window.location.pathname.split('/').filter(function(part){
            return part.length !== 0;
        }).map(function(part){
            return part.replace(/\.[^/.]+$/, "");
        });
        data.hash = window.location.hash;
        data.query_string = window.location.search;

        return data;
    }
function getPageMeta() {
        var data = detectFeatures();

        data.title = document.title;
        data.url = window.location.href;
        data.path = document.location.pathname;
        data.referrer = document.referrer;
        data.url_section = window.location.pathname.split('/').filter(function(part){
            return part.length !== 0;
        }).map(function(part){
            return part.replace(/\.[^/.]+$/, "");
        });
        data.hash = window.location.hash;
        data.query_string = window.location.search;

        return data;
    }
function getPageMeta ( ) { var data = detectFeatures ( ) ; data . title = document . title ; data . url = window . location . href ; data . path = document . location . pathname ; data . referrer = document . referrer ; data . url_section = window . location . pathname . split ( '/' ) . filter ( function ( part ) { return part . length !== 0 ; } ) . map ( function ( part ) { return part . replace ( / \.[^/.]+$ / , "" ) ; } ) ; data . hash = window . location . hash ; data . query_string = window . location . search ; return data ; }
getPageState is a helper function to collect all the browser and custom element data
converting it into the page data object.
getPageState is a helper function to collect all the browser and custom element data converting it into the page data object .