UNPKG

measurement-framework

Version:

Collection of Javascript code to implement a browser based measurement system for websites. It uses a cookie to store a users action on a webpage and let you map thoose actions to a particular state in the user journey.

13 lines (11 loc) 286 B
import document from "document" /** * Get hostname from location. * * @return {string} */ const gaHostname = function () { let hostname = '' + document.location.hostname return (0 === hostname.indexOf('www.') ? hostname.substring(4) : hostname) } export default gaHostname