confignsk 1ae347f531
Some checks are pending
Deploy VitePress site to Pages / build (push) Waiting to run
full start
2025-05-28 01:32:04 +07:00

18 lines
388 B
TypeScript

import { version } from "../package.json";
import type AlgoliaAnalytics from "./insights";
export const DEFAULT_ALGOLIA_AGENTS = [
`insights-js (${version})`,
`insights-js-${__FLAVOR__} (${version})`
];
export function addAlgoliaAgent(
this: AlgoliaAnalytics,
algoliaAgent: string
): void {
if (this._ua.indexOf(algoliaAgent) === -1) {
this._ua.push(algoliaAgent);
}
}