Add Hanzo Insights to bridge with tenant-aware properties

Instruments all bridge tenants (bridge.lux.network, bridge.pars.network,
bridge.hanzo.ai, bridge.zoo.ngo) with insights.hanzo.ai. Events tagged
with tenant ID and hostname for multi-tenant analytics.
This commit is contained in:
2026-03-05 19:01:37 -08:00
parent 5c00959daa
commit b1262c46d2
+6
View File
@@ -66,6 +66,12 @@ const RootLayout: React.FC<PropsWithChildren> = async ({ children }) => {
}
`}</style>
{tenant.faviconUrl && <link rel='icon' href={tenant.faviconUrl} />}
{/* Hanzo Insights — behavioral analytics */}
<script
dangerouslySetInnerHTML={{
__html: `!function(t,e){var o,n,p,r;e.__SV||(window.ha=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.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="ha",u.people=u.people||[],u.toString=function(t){var e="ha";return"ha"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="init capture captureException identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags getFeatureFlag getFeatureFlagPayload reloadFeatureFlags group updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures on getActiveMatchingSurveys getSurveys getNextSurveyStep onSessionId setPersonProperties".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.ha||[]);ha.init('phc_e16a2d5a8033442d87f090b24c606825',{api_host:'https://insights.hanzo.ai',person_profiles:'identified_only'});ha.register({app:'lux-bridge',tenant:'${tenant.id}',hostname:'${hostname}'})`,
}}
/>
</head>
<body
suppressHydrationWarning