Skip to main content

Overview

Glood.AI’s Web Pixel extension includes custom events to provide enhanced personalization and analytics capabilities. This guide covers all the custom Web Pixel events that our platform supports.

What are Glood.AI Custom Web Pixel Events?

Glood.AI Custom Web Pixel events are specialized user interactions and activities that occur on your Shopify store. These events help track customer behavior specific to Glood.AI’s personalization features, enabling:
  • Advanced customer preference tracking
  • Enhanced personalization capabilities
  • Detailed analytics and insights
  • Optimized recommendation performance

Supported Events

The following section details all the custom events supported by Glood.AI’s Web Pixel extension.
Events for tracking and storing customer preferences for personalization.

Event: glood:customer_preference

This event is triggered to store customer preferences for personalization purposes within the Glood.AI platform.

Event Structure

Event Name

glood:customer_preference

Payload

The payload contains a structured object with the following fields:
FieldTypeDescription
preferencesArray of ObjectsAn array of key-value pairs representing customer preferences

Preferences Object

Each object in the preferences array contains:
FieldTypeDescription
keyStringThe key representing the type of preference (e.g., “tags”, “categories”)
valueStringA string representing the value associated with the key (e.g., “tag1,tag2”)

Example Usage

Shopify.analytics.publish('glood:customer_preference', {
    preferences: [
        { key: 'tags', value: "tag1,tag2" }
    ]
});

Purpose

The primary purpose of this event is to store customer preferences in Glood.AI for:
  • Personalization: Enhance customer experiences with tailored content and recommendations
  • Behavior Analysis: Understand customer behavior through preference analysis
  • Targeted Campaigns: Create specific campaigns based on customer preferences

Use Cases

  • Storing customer-selected tags, categories, or other preferences
  • Personalizing product recommendations or content on a Shopify store
  • Supporting segmentation and analytics within Glood.AI
Events for tracking user interactions with Glood recommendation sections.

Event: glood:section:click

This event is triggered when a user clicks on a product within a Glood recommendation section.

Event Structure

Event Name

glood:section:click

Payload

The payload contains information about the clicked product and section:
FieldTypeDescription
pageStringThe page ID where the click occurred
parent.productIdString | nullID of the current product page (if applicable)
parent.variantIdString | nullID of the current product variant (if applicable)
products[].productIdStringID of the clicked product
products[].variantIdStringID of the clicked product variant
sectionStringID of the Glood recommendation section
sectionServeIdStringUnique serve ID for the section render
requestIdStringUnique request ID from the Glood recommendations API call

Example Usage

Shopify.analytics.publish('glood:section:click', {
  page: "55380",
  parent: {
    productId: null,
    variantId: null
  },
  products: [{
    productId: "4594143232103",
    variantId: "32389151621223"
  }],
  section: "216700",
  sectionServeId: "98ae55db-8e25-46be-956e-2024d820edb4",
  requestId: "1734410855-8dd0e6a0-4365-489b-b622-2fedca7129c0"
});

Event: glood:section:add_to_cart

This event is triggered when a product is added to cart from a Glood recommendation section.

Event Structure

Event Name

glood:section:add_to_cart

Payload

The payload contains information about the added product and section:
FieldTypeDescription
pageStringThe page ID where the add to cart occurred
parent.productIdString | nullID of the current product page (if applicable)
parent.variantIdString | nullID of the current product variant (if applicable)
products[].productIdStringID of the product added to cart
products[].variantIdStringID of the product variant added to cart
products[].quantityNumberQuantity of the product added to cart
sectionStringID of the Glood recommendation section
sectionServeIdStringUnique serve ID for the section render
requestIdStringUnique request ID from the Glood recommendations API call

Example Usage

Shopify.analytics.publish('glood:section:add_to_cart', {
  page: "55380",
  parent: {
    productId: null,
    variantId: null
  },
  products: [{
    productId: "4594143232103",
    variantId: "32389151621223",
    quantity: 1
  }],
  section: "216700",
  sectionServeId: "98ae55db-8e25-46be-956e-2024d820edb4",
  requestId: "1734410855-8dd0e6a0-4365-489b-b622-2fedca7129c0"
});

Purpose

These events help track user interactions with Glood recommendation sections to:
  • Measure Engagement: Track clicks and conversions from recommendation sections
  • Analyze Performance: Evaluate the effectiveness of different recommendation strategies
  • Improve Recommendations: Use interaction data to enhance recommendation algorithms

Use Cases

  • Tracking which recommended products users click on
  • Measuring conversion rates from recommendation sections
  • Analyzing user behavior patterns with recommended products
I