Analytics events
This page describes the available analytics events and its parameters. The first section describes the events and the second section describes the available event parameters.
The events are defined as a typescript interface, the documentation for this interface can be found here. We provide an opinionated implementation of this analytics interface for Google Analytics, the technical description of this class can be found here. Custom implementations of this interface can be registered as analytic sinks, this way any kind of analytic system can implemented to consume the analytic events.
The following is a description of the opinionated Google Analytic mapping for the events of the virtual styling component.
Events
Before we list and describe the available analytics events we list the mandatory event parameters and the parameters that are available for each event the refers to a product.
Mandatory event parameters
The following parameters are required in every event.
p2f_component_name
:mdrc
,vsc
p2f_organization_id
Parameters for every event that depends on a product
The following parameters should be set for events that contain product information.
p2f_product_id
(required)p2f_garment_group_id
(required)p2f_garment_group_name
(required)p2f_tryonable
(optional)p2f_collection_id
(optional)p2f_product_price_value
(optional)p2f_product_price_currency
(optional)p2f_product_strike_price_value
(optional)p2f_product_origin
(optional)p2f_product_name
(optional)p2f_brand_name
(optional)
Event definitions
p2f_show_outfit
This event signifies that an outfit was shown. We do not send the event for the very first shown outfit
Parameters
p2f_collection_id (optional)
p2f_product_price_value (optional)
p2f_add_product_to_vdr
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.
Parameters
product specific properties specified above
p2f_avatar_id
(required)p2f_scene_id
(required)p2f_slot_position
(optional)
p2f_change_avatar_in_vdr
This event signifies that an avatar has been selected to be shown in the virtual dressing room.
p2f_avatar_id
(required)p2f_scene_id
(required)p2f_collection_id
(optional)
p2f_change_scene_in_vdr
This event signifies that a scene has been selected to be shown in the virtual dressing room.
p2f_avatar_id
(required)p2f_scene_id
(required)p2f_collection_id
(optional)
p2f_product_impression
This event signifies that product has been presented to the shopper. Either as product image, name and price or in an outfit. TODO: explain in detail how we count.
product specific properties specified above
For PostHog we are aggregating this event. It has the property: p2f_impressions
, which holds an array of product specific properties specified above for each impression. Each of these array holds at most 100 entries.
p2f_share_product
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.
product specific properties specified above
p2f_share_link
This event signifies that the shopper pressed the share button.
p2f_collection_id
(optional)p2f_number_of_products
(required)
p2f_add_product_to_cart
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).
product specific properties specified above
p2f_add_product_bundle_to_cart
This event signifies that the shopper pressed the bundle sale button got pressed (only visible when bundle selling is activated).
p2f_number_of_products
(required)p2f_collection_id
(optional)
p2f_open_component
This event signifies that the component was opened.
p2f_collection_id
(optional)
p2f_close_component
This event signifies that the component was closed.
p2f_collection_id
(optional)
p2f_open_styling_view
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.
p2f_outfit_id
(required)p2f_collection_id
(optional)
p2f_close_styling_view
This event signifies that the styling view was opened. A shopper pressed the “up” button or the component was closed.
p2f_collection_id
(optional)
Paremeter definition
p2f_component_name
The name of the initialised component of the PICTOFiT component library.
Type:
string
Example Value:
mdrc
,vsc
p2f_organization_id
The identifier of the entity that is using the component. Since other identifiers only need be unique within the scope of an organisation this is a required parameter.
Type:
string
Example Value:
gid://pictofit/sku/198580977987
p2f_product_id
The identifier of the product for the event.
Type:
string
Example Value:
gid://pictofit/sku/198580977987
p2f_avatar_id
The identifier of the avatar for the event. For example: The avatar that should be shown in the virtual dressing room.
Type:
string
Example Value:
gid://pictofit/sku/198580977987
p2f_scene_id
The identifier of the scene for the event. For example: The scene that should be shown in the virtual dressing room.
Type:
string
Example Value:
gid://pictofit/sku/198580977987
p2f_collection_id
The identifier of the collection that the component is showing.
Type:
string
Example Value:
gid://pictofit/sku/198580977987
p2f_garment_group_id
The identifier of the PICTOFiT garment group.
Type:
number
Example Value:
4
p2f_garment_group_name
The name of the PICTOFiT garment group.
Type:
string
Example Value:
jackets
p2f_product_price_currency
The currency of the product’s price.
Type:
string
Example Value:
USD
,EUR
, etc
p2f_slot_position
The number of the accessory slot that should show the referenced product.
Type:
string
Example Value:
top
,bottom
,middle
p2f_tryonable
Determines if the corresponding product is tryonable or not. If false
it is considered to be a non tryonable accessory.
Type:
boolean
Example Value:
true
,false
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.
Type:
string
Example Value:
outfit
,share_link
,product_category
p2f_outfit_id
The identifier of the outfit in the event. For example a predefined outfit of the outfit preview screen.
Type:
string
Example value:
gid://pictofit/sku/198580977987
p2f_product_price_value
Value of the product’s price.
Type:
decimal
Example value:
123.45
p2f_product_strike_price_value
Value of the product’s stricke price.
Type:
decimal
Example value:
123.45
p2f_product_name
Value of the product’s name.
Type:
string
Example value:
Black cotton skirt
p2f_brand_name
Value of the product’s brand name.
Type:
string
Example value:
Otto Boss