@aigens2/aigens-sdk-bksg-analytics
v5.0.2
Published
Aigens SDK BKSG Analytics
Readme
aigens-sdk-bksg-analytics
Aigens SDK BKSG Analytics
Install
npm install @aigens2/aigens-sdk-bksg-analytics
npx cap syncAPI
setUserProperties(...)logScreenView(...)logDeepLinkOpen(...)logNotificationOpen(...)logNotificationReceived(...)logSignUp(...)logLogin(...)logLogout()logSelectStore(...)logSelectOrderType(...)logSelectPickupTime(...)logViewItemList(...)logSelectItem(...)logViewItem(...)logAddToCart(...)logRemoveFromCart(...)logViewCart(...)logBeginCheckout(...)logAddPaymentInfo(...)logPurchase(...)logViewPromotion(...)logSelectPromotion(...)logPromotionApply(...)logPromotionRemove(...)logReorder(...)logOrderHistoryView()logCheckoutError(...)logItemOutOfStock(...)logStoreUnavailable(...)requestTrackingAuthorization()addListener('conversionDataSuccess', ...)addListener('conversionDataFail', ...)addListener('appOpenAttribution', ...)addListener('appOpenAttributionFail', ...)addListener('deepLinkResolved', ...)- Interfaces
- Type Aliases
setUserProperties(...)
setUserProperties(options: { memberStatus: MemberStatus; userId?: string; userIdHash?: string; pushEnabled?: boolean; }) => Promise<void>| Param | Type |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| options | { memberStatus: MemberStatus; userId?: string; userIdHash?: string; pushEnabled?: boolean; } |
logScreenView(...)
logScreenView(options: { screenName: string; screenClass: string; }) => Promise<void>| Param | Type |
| ------------- | --------------------------------------------------------- |
| options | { screenName: string; screenClass: string; } |
logDeepLinkOpen(...)
logDeepLinkOpen(options: { deepLinkUrl: string; destinationScreen: string; deepLinkType: string; }) => Promise<void>| Param | Type |
| ------------- | -------------------------------------------------------------------------------------- |
| options | { deepLinkUrl: string; destinationScreen: string; deepLinkType: string; } |
logNotificationOpen(...)
logNotificationOpen(options: { notificationId: string; notificationType: string; destinationScreen: string; }) => Promise<void>| Param | Type |
| ------------- | --------------------------------------------------------------------------------------------- |
| options | { notificationId: string; notificationType: string; destinationScreen: string; } |
logNotificationReceived(...)
logNotificationReceived(options: { notificationId: string; notificationType: string; }) => Promise<void>| Param | Type |
| ------------- | ------------------------------------------------------------------ |
| options | { notificationId: string; notificationType: string; } |
logSignUp(...)
logSignUp(options: { method: string; }) => Promise<void>| Param | Type |
| ------------- | -------------------------------- |
| options | { method: string; } |
logLogin(...)
logLogin(options: { method: string; }) => Promise<void>| Param | Type |
| ------------- | -------------------------------- |
| options | { method: string; } |
logLogout()
logLogout() => Promise<void>logSelectStore(...)
logSelectStore(options: { storeId: string; storeName: string; orderType: OrderType; }) => Promise<void>| Param | Type |
| ------------- | --------------------------------------------------------------------------------------------------- |
| options | { storeId: string; storeName: string; orderType: OrderType; } |
logSelectOrderType(...)
logSelectOrderType(options: { orderType: OrderType; }) => Promise<void>| Param | Type |
| ------------- | --------------------------------------------------------------- |
| options | { orderType: OrderType; } |
logSelectPickupTime(...)
logSelectPickupTime(options: { pickupTimeType: PickupTimeType; scheduledTimestamp?: string; }) => Promise<void>| Param | Type |
| ------------- | ----------------------------------------------------------------------------------------------------------- |
| options | { pickupTimeType: PickupTimeType; scheduledTimestamp?: string; } |
logViewItemList(...)
logViewItemList(options: { itemListId: string; itemListName: string; }) => Promise<void>| Param | Type |
| ------------- | ---------------------------------------------------------- |
| options | { itemListId: string; itemListName: string; } |
logSelectItem(...)
logSelectItem(options: { itemId: string; itemName: string; }) => Promise<void>| Param | Type |
| ------------- | -------------------------------------------------- |
| options | { itemId: string; itemName: string; } |
logViewItem(...)
logViewItem(options: { itemId: string; itemName: string; }) => Promise<void>| Param | Type |
| ------------- | -------------------------------------------------- |
| options | { itemId: string; itemName: string; } |
logAddToCart(...)
logAddToCart(options: { items: AnalyticsCartItem[]; value: number; storeId: string; orderType: OrderType; memberStatus: MemberStatus; }) => Promise<void>| Param | Type |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| options | { items: AnalyticsCartItem[]; value: number; storeId: string; orderType: OrderType; memberStatus: MemberStatus; } |
logRemoveFromCart(...)
logRemoveFromCart(options: { items: AnalyticsCartItem[]; value: number; }) => Promise<void>| Param | Type |
| ------------- | ----------------------------------------------------------- |
| options | { items: AnalyticsCartItem[]; value: number; } |
logViewCart(...)
logViewCart(options: { items: AnalyticsCartItem[]; value: number; }) => Promise<void>| Param | Type |
| ------------- | ----------------------------------------------------------- |
| options | { items: AnalyticsCartItem[]; value: number; } |
logBeginCheckout(...)
logBeginCheckout(options: { promotionId?: string; storeId: string; value: number; }) => Promise<void>| Param | Type |
| ------------- | ---------------------------------------------------------------------- |
| options | { promotionId?: string; storeId: string; value: number; } |
logAddPaymentInfo(...)
logAddPaymentInfo(options: { paymentType: PaymentType; }) => Promise<void>| Param | Type |
| ------------- | --------------------------------------------------------------------- |
| options | { paymentType: PaymentType; } |
logPurchase(...)
logPurchase(options: { transactionId: string; paymentType: PaymentType; value: number; tax?: number; promotionId?: string; storeId: string; orderType: OrderType; memberStatus: MemberStatus; items: AnalyticsCartItem[]; }) => Promise<void>| Param | Type |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| options | { transactionId: string; paymentType: PaymentType; value: number; tax?: number; promotionId?: string; storeId: string; orderType: OrderType; memberStatus: MemberStatus; items: AnalyticsCartItem[]; } |
logViewPromotion(...)
logViewPromotion(options: { promotionId: string; promotionName: string; promotionType: PromotionType; }) => Promise<void>| Param | Type |
| ------------- | ----------------------------------------------------------------------------------------------------------------------- |
| options | { promotionId: string; promotionName: string; promotionType: PromotionType; } |
logSelectPromotion(...)
logSelectPromotion(options: { promotionId: string; promotionName: string; promotionType: PromotionType; }) => Promise<void>| Param | Type |
| ------------- | ----------------------------------------------------------------------------------------------------------------------- |
| options | { promotionId: string; promotionName: string; promotionType: PromotionType; } |
logPromotionApply(...)
logPromotionApply(options: { promotionId: string; promotionType: PromotionType; success: boolean; discountValue?: number; failureReason?: string; storeId?: string; orderType?: OrderType; memberStatus?: MemberStatus; }) => Promise<void>| Param | Type |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| options | { promotionId: string; promotionType: PromotionType; success: boolean; discountValue?: number; failureReason?: string; storeId?: string; orderType?: OrderType; memberStatus?: MemberStatus; } |
logPromotionRemove(...)
logPromotionRemove(options: { promotionId: string; promotionType: PromotionType; }) => Promise<void>| Param | Type |
| ------------- | ------------------------------------------------------------------------------------------------ |
| options | { promotionId: string; promotionType: PromotionType; } |
logReorder(...)
logReorder(options: { sourceTransactionId: string; orderType: OrderType; storeId: string; memberStatus: MemberStatus; value: number; items: AnalyticsCartItem[]; }) => Promise<void>| Param | Type |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| options | { sourceTransactionId: string; orderType: OrderType; storeId: string; memberStatus: MemberStatus; value: number; items: AnalyticsCartItem[]; } |
logOrderHistoryView()
logOrderHistoryView() => Promise<void>logCheckoutError(...)
logCheckoutError(options: { checkoutStep: CheckoutStep; errorCode: string; failureReason: string; paymentType?: PaymentType; cartValue?: number; storeId?: string; memberStatus?: MemberStatus; }) => Promise<void>| Param | Type |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| options | { checkoutStep: CheckoutStep; errorCode: string; failureReason: string; paymentType?: PaymentType; cartValue?: number; storeId?: string; memberStatus?: MemberStatus; } |
logItemOutOfStock(...)
logItemOutOfStock(options: { itemId: string; itemName: string; storeId: string; orderType?: OrderType; memberStatus?: MemberStatus; }) => Promise<void>| Param | Type |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| options | { itemId: string; itemName: string; storeId: string; orderType?: OrderType; memberStatus?: MemberStatus; } |
logStoreUnavailable(...)
logStoreUnavailable(options: { storeId: string; orderType: OrderType; failureReason: string; memberStatus?: MemberStatus; }) => Promise<void>| Param | Type |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| options | { storeId: string; orderType: OrderType; failureReason: string; memberStatus?: MemberStatus; } |
requestTrackingAuthorization()
requestTrackingAuthorization() => Promise<void>addListener('conversionDataSuccess', ...)
addListener(eventName: 'conversionDataSuccess', listenerFunc: (data: { mediaSource?: string; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle| Param | Type |
| ------------------ | --------------------------------------------------------- |
| eventName | 'conversionDataSuccess' |
| listenerFunc | (data: { mediaSource?: string; }) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
addListener('conversionDataFail', ...)
addListener(eventName: 'conversionDataFail', listenerFunc: (data: { error: string; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle| Param | Type |
| ------------------ | -------------------------------------------------- |
| eventName | 'conversionDataFail' |
| listenerFunc | (data: { error: string; }) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
addListener('appOpenAttribution', ...)
addListener(eventName: 'appOpenAttribution', listenerFunc: (data: { attributionData: any; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle| Param | Type |
| ------------------ | --------------------------------------------------------- |
| eventName | 'appOpenAttribution' |
| listenerFunc | (data: { attributionData: any; }) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
addListener('appOpenAttributionFail', ...)
addListener(eventName: 'appOpenAttributionFail', listenerFunc: (data: { error: string; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle| Param | Type |
| ------------------ | -------------------------------------------------- |
| eventName | 'appOpenAttributionFail' |
| listenerFunc | (data: { error: string; }) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
addListener('deepLinkResolved', ...)
addListener(eventName: 'deepLinkResolved', listenerFunc: (data: { deeplinkValue: string; matchType: string; status: string; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle| Param | Type |
| ------------------ | --------------------------------------------------------------------------------------------- |
| eventName | 'deepLinkResolved' |
| listenerFunc | (data: { deeplinkValue: string; matchType: string; status: string; }) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
Interfaces
AnalyticsCartItem
| Prop | Type |
| ------------------ | ------------------- |
| itemId | string |
| itemName | string |
| itemCategory | string |
| itemVariant | string |
| price | number |
| quantity | number |
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove | () => Promise<void> |
Type Aliases
MemberStatus
'member' | 'non_member'
OrderType
'pickup' | 'dine_in' | 'delivery'
PickupTimeType
'asap' | 'scheduled'
PaymentType
'card' | 'apple_pay' | 'google_pay'
PromotionType
'reward' | 'coupon' | 'promo_code'
CheckoutStep
'cart' | 'fulfilment' | 'payment' | 'confirmation'
