Skip to content

Commit 2edca9a

Browse files
committed
send events to demo
1 parent 90097c9 commit 2edca9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/_default/params.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ google_tag_manager = "" # example: G-XXXXXXXXXX
2626
google_adsense = "" # example: ca-pub-xxxxxxxxxxxxxxxx
2727
# custom script on header, example: custom_script= "<script>console.log(\"Hello World\")</script>"
2828
# production script
29-
#custom_script ="<script data-api=\"https://demo.vinceanalytics.com/api/event\" data-domain=\"vinceanalytics.com\">!function(){\"use strict\";var a=window.location,r=window.document,o=r.currentScript,l=o.getAttribute(\"data-api\")||new URL(o.src).origin+\"/api/event\";function s(t,e){t&&console.warn(\"Ignoring Event: \"+t),e&&e.callback&&e.callback()}function t(t,e){if(/^localhost$|^127(\\.[0-9]+){0,2}\\.[0-9]+$|^\\[::1?\\]$/.test(a.hostname)||\"file:\"===a.protocol)return s(\"localhost\",e);if((window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)&&!window.__plausible)return s(null,e);try{if(\"true\"===window.localStorage.plausible_ignore)return s(\"localStorage flag\",e)}catch(t){}var i={},n=(i.n=t,i.u=a.href,i.d=o.getAttribute(\"data-domain\"),i.r=r.referrer||null,e&&e.meta&&(i.m=JSON.stringify(e.meta)),e&&e.props&&(i.p=e.props),new XMLHttpRequest);n.open(\"POST\",l,!0),n.setRequestHeader(\"Content-Type\",\"text/plain\"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4===n.readyState&&e&&e.callback&&e.callback({status:n.status})}}var e=window.plausible&&window.plausible.q||[];window.plausible=t;for(var i,n=0;n<e.length;n++)t.apply(this,e[n]);function p(){i!==a.pathname&&(i=a.pathname,t(\"pageview\"))}var c,u=window.history;u.pushState&&(c=u.pushState,u.pushState=function(){c.apply(this,arguments),p()},window.addEventListener(\"popstate\",p)),\"prerender\"===r.visibilityState?r.addEventListener(\"visibilitychange\",function(){i||\"visible\"!==r.visibilityState||p()}):p()}();</script>"
29+
custom_script ="<script data-api=\"https://demo.vinceanalytics.com/api/event\" data-domain=\"vinceanalytics.com\">!function(){\"use strict\";var a=window.location,r=window.document,o=r.currentScript,l=o.getAttribute(\"data-api\")||new URL(o.src).origin+\"/api/event\";function s(t,e){t&&console.warn(\"Ignoring Event: \"+t),e&&e.callback&&e.callback()}function t(t,e){if(/^localhost$|^127(\\.[0-9]+){0,2}\\.[0-9]+$|^\\[::1?\\]$/.test(a.hostname)||\"file:\"===a.protocol)return s(\"localhost\",e);if((window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)&&!window.__plausible)return s(null,e);try{if(\"true\"===window.localStorage.plausible_ignore)return s(\"localStorage flag\",e)}catch(t){}var i={},n=(i.n=t,i.u=a.href,i.d=o.getAttribute(\"data-domain\"),i.r=r.referrer||null,e&&e.meta&&(i.m=JSON.stringify(e.meta)),e&&e.props&&(i.p=e.props),new XMLHttpRequest);n.open(\"POST\",l,!0),n.setRequestHeader(\"Content-Type\",\"text/plain\"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4===n.readyState&&e&&e.callback&&e.callback({status:n.status})}}var e=window.plausible&&window.plausible.q||[];window.plausible=t;for(var i,n=0;n<e.length;n++)t.apply(this,e[n]);function p(){i!==a.pathname&&(i=a.pathname,t(\"pageview\"))}var c,u=window.history;u.pushState&&(c=u.pushState,u.pushState=function(){c.apply(this,arguments),p()},window.addEventListener(\"popstate\",p)),\"prerender\"===r.visibilityState?r.addEventListener(\"visibilitychange\",function(){i||\"visible\"!==r.visibilityState||p()}):p()}();</script>"
3030

3131
# local scropt
3232
#custom_script ="<script data-api=\"http://localhost:8080/api/event\" data-domain=\"vinceanalytics.com\">!function(){\"use strict\";var r=window.location,o=window.document,s=o.currentScript,l=s.getAttribute(\"data-api\")||new URL(s.src).origin+\"/api/event\";function t(t,e){try{if(\"true\"===window.localStorage.plausible_ignore)return a=e,(i=\"localStorage flag\")&&console.warn(\"Ignoring Event: \"+i),void(a&&a.callback&&a.callback())}catch(t){}var a,i={},n=(i.n=t,i.u=r.href,i.d=s.getAttribute(\"data-domain\"),i.r=o.referrer||null,e&&e.meta&&(i.m=JSON.stringify(e.meta)),e&&e.props&&(i.p=e.props),new XMLHttpRequest);n.open(\"POST\",l,!0),n.setRequestHeader(\"Content-Type\",\"text/plain\"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4===n.readyState&&e&&e.callback&&e.callback({status:n.status})}}var e=window.plausible&&window.plausible.q||[];window.plausible=t;for(var a,i=0;i<e.length;i++)t.apply(this,e[i]);function n(){a!==r.pathname&&(a=r.pathname,t(\"pageview\"))}var p,c=window.history;c.pushState&&(p=c.pushState,c.pushState=function(){p.apply(this,arguments),n()},window.addEventListener(\"popstate\",n)),\"prerender\"===o.visibilityState?o.addEventListener(\"visibilitychange\",function(){a||\"visible\"!==o.visibilityState||n()}):n()}();</script>"
33-
custom_script = ""
33+
#custom_script = ""
3434
# copyright
3535
copyright = "Designed & Developed by [Geofrey Ernest](https://github.com/gernest)"
3636

0 commit comments

Comments
 (0)