This class is an opinionated implementation of the PICTOfit Analytics API to Google Analytic events.

Implements

Constructors

Properties

gaMeasurements: string[]

The google analytics measurement ids

Methods

  • 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

    Parameters

    • properties: CartProperties

      The properties that are available for this event

    Returns Promise<void>

  • 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

    Parameters

    Returns Promise<void>

  • 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

    Parameters

    Returns Promise<void>

  • 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.

    Parameters

    • properties: StateProperties

      The properties that are available for this event

    Returns Promise<void>

  • 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.

    Parameters

    • properties: StateProperties

      The properties that are available for this event

    Returns Promise<void>

  • 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

    Parameters

    Returns Promise<void>

  • 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

    Parameters

    Returns Promise<void>

  • 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

    Parameters

    • properties: StateProperties

      The properties that are available for this event

    Returns Promise<void>

  • 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

    Parameters

    Returns Promise<void>

  • 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

    Parameters

    Returns Promise<void>

  • 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

    Parameters

    Returns Promise<void>

  • 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

    Parameters

    Returns Promise<void>

  • 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

    Parameters

    Returns Promise<void>