LogoLogo
Product TourResourcesLog InBook a Demo
  • Welcome to Crobox
  • What's New
  • GETTING STARTED
    • First Steps
      • Crobox Snippet Implementation
        • Manual Snippet Implementation
        • GTM Snippet Implementation
      • Event Tracking Implementation
        • Pushing Events to Crobox
        • Content Security Policy Header
      • Cookie Wall Settings
    • Launch Your First Product Advisor
      • Choosing the Right Product Category
  • How to guides
    • Product Finders
      • Setup your Advisor
      • Manage the Question Flow
      • Finder Editor
        • Page Settings
        • Question Editor
        • Answer Editor
      • Translations
      • Create Activations
      • Activations: Best Practices
      • Product Quality Assurance
      • A/B Testing
      • Publishing & Versions
    • Campaigns
      • Create a Campaign
      • Testing
      • Campaign Performance
      • Adding a Campaign Category
      • What are the differences between Campaign Types?
    • Product Data
      • Setting up a Product Feed
      • Manage and Transform Product Properties
      • Product Data Enrichment
      • How to Create and Edit Product Tags
      • Adding a Property Category
    • Analytics Dashboard
      • Data Confidence
    • Product Recommenders
      • Creating a Recommender
    • FAQ
      • Performance & Security
      • Data & GDPR
      • How do I track the performance of my campaigns?
      • How do I create segments?
      • What are Smart Filters?
      • What's the difference between CTR impact and relative impact?
      • What's the difference between A/B testing, multivariate testing, and AI?
  • TECHNICAL DOCUMENTATION
    • Setting Custom Visitor Properties with Pageview API
    • Product Advisor Event Tracking Integration
    • Pre-selecting Advisor Questions
    • Custom Themes and CSS
  • Security & Compliance
    • Security Managment
    • Data Security
    • Legal
      • Cookie Policy
      • Developer Mode
      • General Terms and Conditions
  • ADMINISTRATION
    • User Management
    • Accounts and Billing
    • Troubleshooting and Support
Powered by GitBook
LogoLogo

Crobox

  • Product Tour
  • Crobox vs. The Competition

About

  • About Crobox
  • Partners
  • Careers
  • Ambassador Program

Resources

  • Trust Center
  • Blog
  • Resources
  • Privacy Policy
On this page
  • Example Product Advisor Track Event
  • Implementation Steps
  • Key Notes on Naming Conventions

Was this helpful?

  1. TECHNICAL DOCUMENTATION

Product Advisor Event Tracking Integration

This guide explains how to integrate the Product Advisor event to send analytic information to your analytics platform.

These events provide detailed insights into the behavior and performance of Product Advisors on your platform, enabling seamless integration with third-party analytics systems.

The Product Advisor component generates events that contain rich data about user interactions and advisor performance. By hooking into these events, you can relay the information to your preferred analytics platform for deeper insights.

Example Product Advisor Track Event

Below is a structure of the FinderTrackEvent object in TypeScript, which is emitted whenever a relevant interaction occurs:

type FinderTrackEvent = {
  id: string; // unique identifier of the finder
  variant: string; // unique identifier of the finder variant (for A/B testing)
  activation: string; // what activated this finder (e.g., 'ribbon' or 'custom')
  open: boolean; // is the finder opened or closed
  name: string; // name of the finder
  version: number; // current version of the finder
  page: string; // component currently shown to the end-user (e.g., landing or loading)
  question: string; // current question the user is on (e.g., 'gender' or 'goal')
  answers: Record<string, string>; // all answers previously given, e.g., {'landing': '1', 'gender': 'male'}
  products: string[]; // if the page is a result page, contains the product-IDs advised
};

window.crobox = window.crobox || [];
crobox.push(crobox => {
  crobox.on('productfinder.track', (event: FinderTrackEvent) => {
    // TODO: Implement the connection to third-party analytics
  });
});

Implementation Steps

Follow these steps to integrate Product Advisor tracking events with your analytics platform:

  1. Hook Into the Event

Use the crobox.on('productfinder.track', callback) method to listen to FinderTrackEvent emissions.

window.crobox = window.crobox || [];
crobox.push(crobox => {
  crobox.on('productfinder.track', (event) => {
    console.log('FinderTrackEvent:', event);
  });
});
  1. Process the Event Data

Extract relevant fields from the event object, such as id, variant, activation, products, etc. Ensure that the data aligns with your analytics platform's structure.

  1. Send to Analytics Platform

Map the extracted data to your analytics platform's schema and use its API to send the event information, for example:

crobox.on('productfinder.track', (event) => {
  const analyticsData = {
    finderId: event.id,
    variantId: event.variant,
    activationMethod: event.activation,
    isOpen: event.open,
    currentPage: event.page,
    currentQuestion: event.question,
    answers: event.answers,
    advisedProducts: event.products,
  };

  // Replace this with your analytics platform API call
  sendToAnalyticsPlatform(analyticsData);
});

function sendToAnalyticsPlatform(data) {
  // Example API call
  fetch('https://your-analytics-platform.com/api/track', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    body: JSON.stringify(data),
  });
}
  1. Verify the Integration

Test the integration by triggering various interactions with the Product Advisor. Confirm that the events are being accurately sent to and processed by your analytics platform in comparison to your Crobox platform analytics.

Key Notes on Naming Conventions

To maintain consistency and clarity, adhere to the following naming conventions when working with the FinderTrackEvent object:

  • Identifiers: Use the id and variant fields to uniquely identify each Product Advisor and its variant. Ensure these are mapped correctly in your analytics platform.

  • Activation Type: The activation field specifies what triggered the finder (e.g., ribbon or a custom trigger). This is critical for analysing the effectiveness of different activation methods.

  • User Interaction States: Utilise the open and page fields to track user interaction states and navigation flow.

  • User Inputs: Leverage the question and answers fields to understand user choices and behaviour during their interaction. Avoid locking onto specific keys or names as they may change over time.

    • For example, a field currently named gender might be updated to gender-v2 in the future. Relying on static field names in your tracking code could result in broken functionality.

  • Results Data: Use the products field to track which products are being advised to the user on result pages.

By following this guide, you can effectively integrate Product Advisor analytics into your analytics platform, providing enhanced visibility into user behaviour and Product Advisor performance.

PreviousSetting Custom Visitor Properties with Pageview APINextPre-selecting Advisor Questions

Last updated 5 months ago

Was this helpful?