import { Analytics } from '../../../core/analytics' interface ITriblioData { country: string domain: string employees: string industry: string isIsp: boolean name: string revenue: string } declare global { interface Window { Triblio?: { getAccountIdentification: () => ITriblioData } } } export async function loadTriblio(analytics: Analytics): Promise { if (!window.Triblio) { return } if (analytics.group().traits()?.website) { return } const account = window.Triblio.getAccountIdentification() if (account.isIsp || !account.domain) { return } await analytics.group(null, { website: account.domain, intentSource: 'triblio', name: account.name || undefined, country: account.country || undefined, industry: account.industry || undefined, number_of_employees: account.employees || undefined, annual_revenue: account.revenue || undefined, }) }