mirror of
https://github.com/hanzoai/insights-js.git
synced 2026-10-30 18:34:19 +00:00
Bulk rename across 989 files: - Package names: posthog-js → @hanzo/insights, posthog-node → @hanzo/insights-node, etc. - Repository URLs: posthog/posthog-js → hanzoai/insights-js - Brand names: PostHog → Insights - File renames: 259 reference JSON files, source files, workflow files - Directory rename: eslint-plugin-posthog-js → eslint-plugin-insights Remaining: 8 refs to @posthog/rrweb-* (real npm deps, need fork+publish)
67 lines
3.2 KiB
HTML
67 lines
3.2 KiB
HTML
<html>
|
|
<head>
|
|
<title>Insights JS Snippet test</title>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
if (false) { // unminified code
|
|
(function(x, a) {
|
|
if (!a.__SV) {
|
|
var l, h, s, n;
|
|
window.insights = a;
|
|
a._i = [];
|
|
a.init = function(b, d, g) {
|
|
s = x.createElement("script");
|
|
s.type = "text/javascript";
|
|
s.crossOrigin = "anonymous";
|
|
s.async = !0;
|
|
s.src = d.api_host + "/static/array.full.js";
|
|
n = x.getElementsByTagName("script")[0];
|
|
n.parentNode.insertBefore(s, n)
|
|
|
|
function c(b, i) {
|
|
var a = i.split(".");
|
|
2 == a.length && (b = b[a[0]], i = a[1]);
|
|
b[i] = function() {
|
|
b.push([i].concat(Array.prototype.slice.call(arguments,
|
|
0)))
|
|
}
|
|
}
|
|
var e = a;
|
|
"undefined" !== typeof g ? e = a[g] = [] : g = "insights";
|
|
e.people = e.people || [];
|
|
e.toString = function(b) {
|
|
var a = "insights";
|
|
"insights" !== g && (a += "." + g);
|
|
b || (a += " (stub)");
|
|
return a
|
|
};
|
|
e.people.toString = function() {
|
|
return e.toString(1) + ".people (stub)"
|
|
};
|
|
l = "capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset".split(" ");
|
|
for (h = 0; h < l.length; h++) c(e, l[h]);
|
|
a._i.push([b, d, g])
|
|
};
|
|
a.__SV = 1.0;
|
|
}
|
|
})(document, window.insights || []);
|
|
console.log('starting everything')
|
|
insights.init('BrpS4SctoaCCsyjlnlun3OzyNJAafdlv__jUWaaJWXg', { api_host: 'https://app.insights.hanzo.ai' })
|
|
insights.capture('bla111-before-init2')
|
|
insights.identify('user-00002');
|
|
insights.people.set({email: '[email protected]'});
|
|
insights.people.set('peoplesetkey', 'that is correct')
|
|
}
|
|
</script>
|
|
|
|
<script>
|
|
if (true) { // minified code
|
|
!function(t,e){var o,n,p,r;e.__SV||(window.insights=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.crossOrigin="anonymous",p.async=!0,p.src=s.api_host+"/static/array.full.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="insights",u.people=u.people||[],u.toString=function(t){var e="insights";return"insights"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.insights||[]);
|
|
insights.init('BrpS4SctoaCCsyjlnlun3OzyNJAafdlv__jUWaaJWXg', {api_host: 'https://app.insights.hanzo.ai'})
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|