mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-09-14 00:33:10 +00:00
feat: Yandex Metrika CID tracking, offline conversions UI, sticky pay button
- Pass yandex_cid to all auth endpoints (telegram, email, OIDC, OAuth) - Add OfflineConvGoal interface and offline_conv_* fields to AnalyticsCounters - Add storeYandexCid API method for server-side CID persistence - Add analytics fields to LandingConfig (view/click goals, sticky_pay_button) - Add yandex_cid/referrer/subid to PurchaseRequest - Add offline conversions UI block in admin AnalyticsTab - Add cacheYandexCid, syncYandexCid, fireAnalyticsEvent to analytics hook - Create yandexCid.ts utility (localStorage get/set helpers) - Add sticky pay button with portal on mobile in QuickPurchase - Fire view/click analytics goals on landing pages - Persist contact value and referrer/subid in session/localStorage - Add i18n keys for offlineConv and apiKey in all 4 locales
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import apiClient from './client';
|
||||
import { getYandexCid } from '../utils/yandexCid';
|
||||
import type {
|
||||
AuthResponse,
|
||||
LinkCallbackResponse,
|
||||
@@ -22,6 +23,7 @@ export const authApi = {
|
||||
init_data: initData,
|
||||
campaign_slug: campaignSlug || undefined,
|
||||
referral_code: referralCode || undefined,
|
||||
yandex_cid: getYandexCid() || undefined,
|
||||
});
|
||||
return response.data;
|
||||
},
|
||||
@@ -43,6 +45,7 @@ export const authApi = {
|
||||
...data,
|
||||
campaign_slug: campaignSlug || undefined,
|
||||
referral_code: referralCode || undefined,
|
||||
yandex_cid: getYandexCid() || undefined,
|
||||
});
|
||||
return response.data;
|
||||
},
|
||||
@@ -56,6 +59,7 @@ export const authApi = {
|
||||
id_token: idToken,
|
||||
campaign_slug: campaignSlug || undefined,
|
||||
referral_code: referralCode || undefined,
|
||||
yandex_cid: getYandexCid() || undefined,
|
||||
});
|
||||
return response.data;
|
||||
},
|
||||
@@ -71,6 +75,7 @@ export const authApi = {
|
||||
password,
|
||||
campaign_slug: campaignSlug || undefined,
|
||||
referral_code: referralCode || undefined,
|
||||
yandex_cid: getYandexCid() || undefined,
|
||||
});
|
||||
return response.data;
|
||||
},
|
||||
@@ -87,6 +92,7 @@ export const authApi = {
|
||||
const response = await apiClient.post('/cabinet/auth/email/register', {
|
||||
email,
|
||||
password,
|
||||
yandex_cid: getYandexCid() || undefined,
|
||||
});
|
||||
return response.data;
|
||||
},
|
||||
@@ -101,7 +107,7 @@ export const authApi = {
|
||||
}): Promise<RegisterResponse> => {
|
||||
const response = await apiClient.post<RegisterResponse>(
|
||||
'/cabinet/auth/email/register/standalone',
|
||||
data,
|
||||
{ ...data, yandex_cid: getYandexCid() || undefined },
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
@@ -198,6 +204,7 @@ export const authApi = {
|
||||
device_id: deviceId || undefined,
|
||||
campaign_slug: campaignSlug || undefined,
|
||||
referral_code: referralCode || undefined,
|
||||
yandex_cid: getYandexCid() || undefined,
|
||||
},
|
||||
);
|
||||
return response.data;
|
||||
|
||||
Reference in New Issue
Block a user