Skip to content

Commit 92fc5b9

Browse files
authored
Track only user on production (#327)
1 parent da3a7bd commit 92fc5b9

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/main/webapp/index.html

+7-4
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,14 @@
5959
(function(e,a){if(!a.__SV){var b=window;try{var c,l,i,j=b.location,g=j.hash;c=function(a,b){return(l=a.match(RegExp(b+"=([^&]*)")))?l[1]:null};g&&c(g,"state")&&(i=JSON.parse(decodeURIComponent(c(g,"state"))),"mpeditor"===i.action&&(b.sessionStorage.setItem("_mpcehash",g),history.replaceState(i.desiredHash||"",e.title,j.pathname+j.search)))}catch(m){}var k,h;window.mixpanel=a;a._i=[];a.init=function(b,c,f){function e(b,a){var c=a.split(".");2==c.length&&(b=b[c[0]],a=c[1]);b[a]=function(){b.push([a].concat(Array.prototype.slice.call(arguments,
6060
0)))}}var d=a;"undefined"!==typeof f?d=a[f]=[]:f="mixpanel";d.people=d.people||[];d.toString=function(b){var a="mixpanel";"mixpanel"!==f&&(a+="."+f);b||(a+=" (stub)");return a};d.people.toString=function(){return d.toString(1)+".people (stub)"};k="disable time_event track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config reset people.set people.set_once people.increment people.append people.union people.track_charge people.clear_charges people.delete_user".split(" ");
6161
for(h=0;h<k.length;h++)e(d,k[h]);a._i.push([b,c,f])};a.__SV=1.2;b=e.createElement("script");b.type="text/javascript";b.async=!0;b.src="undefined"!==typeof MIXPANEL_CUSTOM_LIB_URL?MIXPANEL_CUSTOM_LIB_URL:"file:"===e.location.protocol&&"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js".match(/^\/\//)?"https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js":"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";c=e.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c)}})(document,window.mixpanel||[]);
62-
mixpanel.init("cc73c77da0ba5e5cc01d3f58703baa56");
6362

64-
function track(event_name) {
65-
mixpanel.track(event_name);
66-
}
63+
if (window.location.hostname.toLowerCase().search('www.otchi.io')==0) {
64+
mixpanel.init("cc73c77da0ba5e5cc01d3f58703baa56");
65+
}
66+
67+
function track(event_name) {
68+
mixpanel.track(event_name);
69+
}
6770
</script>
6871
<!-- end Mixpanel -->
6972

0 commit comments

Comments
 (0)