import { CartProperties, CloseComponentProperties, CloseStylingViewProperties, IAnalyticEvents, OpenComponentProperties, OpenStylingViewProperties, OutfitShownProperties, ProductProperties, StateProperties } from '../analytics'; import { AssetReference, GarmentInformationProvider } from '../virtual-styling'; import { CommerceProvider } from '../commerce'; export declare const tryToUniformCurrency: (cur?: string) => string | undefined; export declare const assetReferenceToString: (asset: AssetReference) => string; /** * This class is an opinionated implementation of the PICTOfit Analytics API to Google Analytic events. */ export declare class GoogleAnalyticsProvider implements Partial { /** * The google analytics measurement ids */ gaMeasurements: Array; /** * The garment information provider that is used to get information */ private garmentInformation?; /** * The commerce provider that is used to get information */ private ecommerceProvider?; constructor( /** * The google analytics measurement ids */ gaMeasurements: Array, /** * The garment information provider that is used to get information */ garmentInformation?: GarmentInformationProvider | undefined, /** * The commerce provider that is used to get information */ ecommerceProvider?: CommerceProvider | undefined); private GetStateProperties; private GetCollectionProperties; private track; private GetProductDescriptionData; /** * This event signifies that the component was opened. * * It tracks a google analytics event called `p2f_open_component`. This event has * the following properties: * - `p2f_component_name`: The name of the component, either `mdrc` or `vsc` * - `p2f_organization_id`: The organization id * - `p2f_collection_id`: The collection id * * @param properties The properties that are available for this event */ OpenComponent(properties: OpenComponentProperties): Promise; /** * This event signifies that the component was closed. * * It tracks a google analytics event called `p2f_close_component`. This event has * the following properties: * - `p2f_component_name`: The name of the component, either `mdrc` or `vsc` * - `p2f_organization_id`: The organization id * - `p2f_collection_id`: The collection id * * @param properties The properties that are available for this event */ CloseComponent(properties: CloseComponentProperties): Promise; /** * This event signifies that the styling view was opened. * * A shopper pressed the “style it” button below an outfit or the styling view was the destination of are shared link. * * It tracks a google analytics event called `p2f_open_styling_view`. This event has * the following properties: * - `p2f_component_name`: The name of the component, either `mdrc` or `vsc` * - `p2f_organization_id`: The organization id * - `p2f_collection_id`: The collection id * - `p2f_outfit_id`: The outfit id * * @param properties The properties that are available for this event */ OpenStylingView(properties: OpenStylingViewProperties): Promise; /** * This event signifies that the styling view was opened. A shopper pressed the “up” button or the component was closed. * * It tracks a google analytics event called `p2f_close_styling_view`. This event has * the following properties: * - `p2f_component_name`: The name of the component, either `mdrc` or `vsc` * - `p2f_organization_id`: The organization id * - `p2f_collection_id`: The collection id * * @param properties The properties that are available for this event */ CloseStylingView(properties: CloseStylingViewProperties): Promise; /** * This event signifies that an outfit was shown * * It tracks a google analytics event called `p2f_show_outfit`. This event has * the following properties: * - `p2f_component_name`: The name of the component, either `mdrc` or `vsc` * - `p2f_organization_id`: The organization id * - `p2f_collection_id`: The collection id * - `p2f_product_price_value`: The price of the products in the outfit summed up * * @param properties The properties that are available for this event */ OutfitShown(properties: OutfitShownProperties): Promise; /** * This event signifies that a product has been added to the virtual dressing room. * Either as a garment on the avatar or in one of the accessory slots. This can be triggered * by clicking on “style it” in the outfits screen or from the product menus. * * It tracks a google analytics event called `p2f_add_product_to_vdr`. This event has * the following properties: * - `p2f_component_name`: The name of the component, either `mdrc` or `vsc` * - `p2f_organization_id`: The organization id, usually a UUID * - `p2f_collection_id`: The collection id (For example: `gid://pictofit/collection/cool-collection`) * - `p2f_product_id`: The identifier of the product for the event. (For example: `gid://pictofit/sku/198580977987`) * - `p2f_garment_group_id`: The identifier of the PICTOFiT garment group. A numeric value * - `p2f_garment_group_name`: The name of the PICTOFiT garment group. * - `p2f_tryonable`: Determines if the corresponding product is tryonable or not. If false it is considered to be a non tryonable accessory. A boolean value. * - `p2f_product_price_value`: The price of the product * - `p2f_product_name`: The name of the product * - `p2f_brand_name`: The name of the product’s brand * - `p2f_product_price_currency`: The currency of the product’s price. (Examples: `USD`, `EUR`) * - `p2f_product_strike_price_value`: The strike price of the product * - `p2f_product_origin`: Determines the origin of the event. For example the outfit of the outfit preview where the shopper pressed the “style it” button, a share linke or the menu with the categorised products. Values are `outfit`, `share` and `product_category` * * @param properties The properties that are available for this event */ AddProductToVdr(properties: ProductProperties): Promise; /** * This event signifies that an avatar has been selected to be shown in the virtual dressing room. * * It tracks a google analytics event called `p2f_change_avatar_in_vdr`. This event has * the following properties: * - `p2f_component_name`: The name of the component, either `mdrc` or `vsc` * - `p2f_organization_id`: The organization id, usually a UUID * - `p2f_collection_id`: The collection id (For example: `gid://pictofit/collection/cool-collection`) * - `p2f_avatar_id`: The identifier of the avatar for the event. (For example: `gid://pictofit/sku/198580977987`) * - `p2f_scene_id`: The identifier of the scene for the event. (For example: `gid://pictofit/sku/198580977987`) * - `p2f_slot_position`: The name of the PICTOFiT garment group. * * @param properties The properties that are available for this event */ ChangeAvatarInVdr(properties: StateProperties): Promise; /** * This event signifies that a scene has been selected to be shown in the virtual dressing room. * * It tracks a google analytics event called `p2f_change_scene_in_vdr`. This event has * the following properties: * - `p2f_component_name`: The name of the component, either `mdrc` or `vsc` * - `p2f_organization_id`: The organization id, usually a UUID * - `p2f_collection_id`: The collection id (For example: `gid://pictofit/collection/cool-collection`) * - `p2f_avatar_id`: The identifier of the avatar for the event. (For example: `gid://pictofit/sku/198580977987`) * - `p2f_scene_id`: The identifier of the scene for the event. (For example: `gid://pictofit/sku/198580977987`) * - `p2f_slot_position`: The name of the PICTOFiT garment group. * * @param properties The properties that are available for this event */ ChangeSceneInVdr(properties: StateProperties): Promise; /** * This event signifies that product has been presented to the shopper. Either as product image, name and price or in an outfit. * * It tracks a google analytics event called `p2f_product_impression`. This event has * the following properties: * - `p2f_component_name`: The name of the component, either `mdrc` or `vsc` * - `p2f_organization_id`: The organization id, usually a UUID * - `p2f_collection_id`: The collection id (For example: `gid://pictofit/collection/cool-collection`) * - `p2f_product_id`: The identifier of the product for the event. (For example: `gid://pictofit/sku/198580977987`) * - `p2f_garment_group_id`: The identifier of the PICTOFiT garment group. A numeric value * - `p2f_garment_group_name`: The name of the PICTOFiT garment group. * - `p2f_tryonable`: Determines if the corresponding product is tryonable or not. If false it is considered to be a non tryonable accessory. A boolean value. * - `p2f_product_price_value`: The price of the product * - `p2f_product_price_currency`: The currency of the product’s price. (Examples: `USD`, `EUR`) * - `p2f_product_strike_price_value`: The strike price of the product * - `p2f_product_name`: The name of the product * - `p2f_brand_name`: The name of the product’s brand * * @param properties The properties that are available for this event */ ProductImpression(properties: ProductProperties): Promise; /** * This event signifies that a product has been shared as a part of a shared outfit. * For each product shown in the virtual dressing room (tried-on garments and accessories in the slots) * this event will be triggered at the moment when the share button got pressed. * * It tracks a google analytics event called `p2f_share_product`. This event has * the following properties: * - `p2f_component_name`: The name of the component, either `mdrc` or `vsc` * - `p2f_organization_id`: The organization id, usually a UUID * - `p2f_collection_id`: The collection id (For example: `gid://pictofit/collection/cool-collection`) * - `p2f_product_id`: The identifier of the product for the event. (For example: `gid://pictofit/sku/198580977987`) * - `p2f_garment_group_id`: The identifier of the PICTOFiT garment group. A numeric value * - `p2f_garment_group_name`: The name of the PICTOFiT garment group. * - `p2f_tryonable`: Determines if the corresponding product is tryonable or not. If false it is considered to be a non tryonable accessory. A boolean value. * - `p2f_product_price_value`: The price of the product * - `p2f_product_price_currency`: The currency of the product’s price. (Examples: `USD`, `EUR`) * - `p2f_product_strike_price_value`: The strike price of the product * - `p2f_product_name`: The name of the product * - `p2f_brand_name`: The name of the product’s brand * * @param properties The properties that are available for this event */ ProductShared(properties: ProductProperties): Promise; /** * This event signifies that the shopper pressed the share button. * * It tracks a google analytics event called `p2f_share_link`. This event has * the following properties: * - `p2f_component_name`: The name of the component, either `mdrc` or `vsc` * - `p2f_organization_id`: The organization id, usually a UUID * - `p2f_collection_id`: The collection id (For example: `gid://pictofit/collection/cool-collection`) * - `p2f_avatar_id`: The identifier of the avatar for the event. (For example: `gid://pictofit/sku/198580977987`) * - `p2f_scene_id`: The identifier of the scene for the event. (For example: `gid://pictofit/sku/198580977987`) * - `p2f_number_of_products`: The amount of garments that were shared in the link * * @param properties The properties that are available for this event */ LinkShared(properties: StateProperties): Promise; /** * This event signifies that a shopper wants to add a specific product to the shopping cart. * If bundle sale got pressed this event gets triggered for each product in the virtual * dressing room (tried-on garments and accessories in the slots). * * It tracks a google analytics event called `p2f_add_product_to_cart`. This event has * the following properties: * - `p2f_component_name`: The name of the component, either `mdrc` or `vsc` * - `p2f_organization_id`: The organization id, usually a UUID * - `p2f_collection_id`: The collection id (For example: `gid://pictofit/collection/cool-collection`) * - `p2f_product_id`: The identifier of the product for the event. (For example: `gid://pictofit/sku/198580977987`) * - `p2f_garment_group_id`: The identifier of the PICTOFiT garment group. A numeric value * - `p2f_garment_group_name`: The name of the PICTOFiT garment group. * - `p2f_tryonable`: Determines if the corresponding product is tryonable or not. If false it is considered to be a non tryonable accessory. A boolean value. * - `p2f_product_price_value`: The price of the product * - `p2f_product_price_currency`: The currency of the product’s price. (Examples: `USD`, `EUR`) * - `p2f_product_strike_price_value`: The strike price of the product * - `p2f_product_name`: The name of the product * - `p2f_brand_name`: The name of the product’s brand * * @param properties The properties that are available for this event */ AddProductToCart(properties: ProductProperties): Promise; /** * This event signifies that the shopper pressed the bundle sale button got pressed (only visible when bundle selling is activated). * * It tracks a google analytics event called `p2f_add_product_bundle_to_cart`. This event has * the following properties: * - `p2f_component_name`: The name of the component, either `mdrc` or `vsc` * - `p2f_organization_id`: The organization id, usually a UUID * - `p2f_collection_id`: The collection id (For example: `gid://pictofit/collection/cool-collection`) * - `p2f_avatar_id`: The identifier of the avatar for the event. (For example: `gid://pictofit/sku/198580977987`) * - `p2f_scene_id`: The identifier of the scene for the event. (For example: `gid://pictofit/sku/198580977987`) * - `p2f_number_of_products`: The amount of garments that were added to the cart * * @param properties The properties that are available for this event */ AddBundleToCart(properties: CartProperties): Promise; }