Comparing version 1.1.3 to 1.1.4
@@ -1,1 +0,1 @@ | ||
(function(){"use strict";var d=function(c){var i=c.server,j=c.domain,k=function(){fetch(i+"/pageview",{method:"POST",body:JSON.stringify({url:location.href,domain:j,referrer:document.referrer}),headers:{"content-type":"application/json"}})};return{pageview:k}},a=document.currentScript||document.querySelector("script[data-analybase]");if(a){var e=a.getAttribute("data-site"),f=a.getAttribute("data-server")||"https://api.analybase.com",g=location.hostname==="localhost"||/\.local$/.test(location.hostname);if(!g){var b=d({server:f,domain:e});b.pageview();var h=history.pushState;history.pushState=function(){return b.pageview(),h.apply(this,arguments)},window.addEventListener("popstate",function(){b.pageview()})}}})(); | ||
(function(){"use strict";var d=function(c){var i=c.server,j=c.domain,k=function(){var l=location.origin+location.pathname+location.search;fetch(i+"/pageview",{method:"POST",body:JSON.stringify({url:l,domain:j,referrer:document.referrer}),headers:{"content-type":"application/json"}})};return{pageview:k}},a=document.currentScript||document.querySelector("script[data-analybase]");if(a){var e=a.getAttribute("data-site"),f=a.getAttribute("data-server")||"https://api.analybase.com",g=location.hostname==="localhost"||/\.local$/.test(location.hostname);if(!g){var b=d({server:f,domain:e});b.pageview();var h=history.pushState;history.pushState=function(){h.apply(this,arguments),b.pageview()},window.addEventListener("popstate",function(){b.pageview()})}}})(); |
@@ -9,6 +9,7 @@ (function () { | ||
var pageview = function () { | ||
var url = location.origin + location.pathname + location.search; | ||
fetch((server + "/pageview"), { | ||
method: "POST", | ||
body: JSON.stringify({ | ||
url: location.href, | ||
url: url, | ||
domain: domain, | ||
@@ -40,4 +41,4 @@ referrer: document.referrer | ||
history.pushState = function() { | ||
p.apply(this, arguments); | ||
api.pageview(); | ||
return p.apply(this, arguments); | ||
}; | ||
@@ -44,0 +45,0 @@ window.addEventListener("popstate", function () { |
{ | ||
"name": "analybase", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "*.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2427
48