This commit is contained in:
IlyaDoronin 2024-05-10 15:02:01 +03:00
parent 30006f4f4f
commit b32b371a10

@ -8,11 +8,11 @@ type MetricsGoal = {
goal: string; goal: string;
}; };
type ExtendedWindow = Window & { _tmp?: MetricsGoal[] }; type ExtendedWindow = Window & { _tmr?: MetricsGoal[] };
const sendMetrics = (vkPixelId: number | undefined, goal: string) => { const sendMetrics = (vkPixelId: number | undefined, goal: string) => {
if (vkPixelId) { if (vkPixelId) {
(window as ExtendedWindow)._tmp?.push({ (window as ExtendedWindow)._tmr?.push({
type: "reachGoal", type: "reachGoal",
id: vkPixelId, id: vkPixelId,
goal, goal,