Tracking Events
As outlined in the Analytics & Tracking guide, the SCAYLE Storefront Application automatically tracks a range of key e-commerce interactions. This page delves into the specifics of each of these tracking events, providing in-depth descriptions of their function and the parameters they capture, enabling a deeper understanding of your customer's journey.
Event Building Blocks
Every event pushed to the data layer adheres to a modular structure composed of four primary blocks to ensure all events are universally compatible and easy to analyze.
1. Event Name
This mandatory string field acts as the action identifier for the event (e.g., "add_to_cart", "purchase", "select_promotion").
2. Location Context
The page object sets the context by providing the previous and the current page information. You can find the complete list of available parameters for the page context, including all accepted page types and interaction_source values, in the Page Context Composable Documentation.
3. Global Session Context
The session object contains persistent data defining the user, shop, and technical environment for the entire session. This data is critical for attribution and segmentation and is handled in full compliance with GDPR regulations to ensure user privacy and data security.
For a comprehensive list of all required and optional parameters within the session context, please consult the Session Context Composable Documentation.
4. Event-Specific Data
This block holds the transactional and descriptive details that are unique to the event being tracked.
It usually includes the ecommerce object for commerce-related actions. The structure within the ecommerce object dynamically changes based on the nature of the event:
- Product Data: For events like
add_to_cartorpurchase, theitemsarray includes product details (ID, name, final price, quantity, brand, and custom fields). The complete product item schema, including all mandatory GA4 fields and custom fields, is detailed in the E-commerce Product Data Schema Documentation. - Promotion Data: For events like
view_promotionorselect_promotion, theitemsarray includes metadata about the promotion (e.g.,promotion_id,promotion_name,promotion_link). The complete promotion item schema is available in the E-commerce Product Data Schema Documentation.
Shop Initialization Events
shop_init
- Triggered on every page load when a user opens the shop for the first time.
shop_change
- Triggered when a user changes the shop, e.g. after a language / country change.
content_view
- Triggered when a user navigates to a new page within the shop or views a page for the first time in their session.
Product Interaction Events
select_item
- Triggered when a user clicks on a product tile or color variant thumbnail to view the Product Detail Page. This event captures user interest in specific products.
view_item
- Triggered when a user lands on the Product Detail Page (PDP), indicating engagement with a specific product's details.
view_item_list
- Triggered when a user has been presented with a list of items (e.g., PLP scroll, product slider view, recommended products).
add_to_cart
- Triggered when a user adds an item to their shopping basket.
remove_from_cart
- Triggered when a user removes an item from their basket.
cart
- Triggered on basket updates, such as adding or removing items, or changing quantities. This event sends the updated list of products in the basket.
view_cart
- Triggered when a user navigates to the basket page.
add_to_wishlist
- Triggered when a user adds an item to their wishlist.
remove_from_wishlist
- Triggered when a user removes an item from their wishlist.
wishlist
- Triggered on wishlist updates, such as adding or removing items. This event sends the updated list of products in the wishlist.
view_promotion
- Triggered when a user opens the deals flyout, opens a PDP/Basket with a promotion banner/ribbon, or views any page containing promotional content.
select_promotion
- Triggered when a user clicks on a promotion card, banner, or link (e.g., inside the deals flyout).
Checkout Funnel Events
begin_checkout
- Triggered before redirecting to the checkout process, indicating the start of the checkout funnel.
add_shipping_info
- Triggered when a user submits shipping details or selects a shipping option/method during the checkout funnel.
add_payment_info
- Triggered when a user selects a payment method (e.g., credit card, PayPal, Klarna) during the checkout funnel.
complete_checkout
- Triggered when a user clicks the final "Buy Now" button.
purchase
- Triggered when a user lands on the order success page after completing a purchase. This event confirms a completed transaction.
User Authentication Events
sign_up
- Triggered when a user registers or signs up for an account.
login
- Triggered when a user successfully logs into their account.
logout
- Triggered when a user logs out of their account.
Search and Filter Events
search
- Triggered when a user performs a search query.
filter
- Triggered when a user applies a filter or sorting, opens a filter flyout, resets all filters or clicks on View All button.
Error
error
- Fires upon critical errors (e.g., 404, invalid form input) and reports the specific
typeof error.