Analytics
Analytics is a fundamental part of Luigi’s Box services. It is designed not only to show the performance of individual services like Search or Recommender but also to collect user interactions from your website. This behavioral data is then fed to the AI models that drive ranking and product selection.
Integrating analytics is a separate step from making API calls for search or recommendations. Events must be sent independently to be recorded. Note that if you use Luigi’s Box frontend libraries, they handle sending these analytics events automatically. You can track events through a JavaScript-based collector that monitors a dataLayer object or by sending events directly to the API, which is ideal for backend or mobile app integrations.
Choose your integration path
Section titled “Choose your integration path”DataLayer Collector
A JavaScript-based collector that listens to ecommerce events pushed into your `dataLayer`.
- Fastest way to integrate analytics on the web.
- Works well with GA4-style ecommerce events.
- Fits naturally with Luigi's Box frontend libraries.
Events API
A low-level API for sending structured analytics payloads directly from your backend or mobile app.
- Full control over the event payloads.
- Great for mobile, backend, and server-side integrations.
- Independent from browser-side scripts.
Start here
Section titled “Start here”Need the shared foundation first? Start with Analytics and object identity.
Implementing on a website? Continue with the DataLayer Collector quickstart.
Implementing on a backend or mobile app? Continue with the Events API quickstart.
Verifying your setup? Use the analytics debugging guide.
Core concepts
Section titled “Core concepts”Beyond choosing an integration path, it’s important to understand the concepts that make Luigi’s Box Analytics powerful.
- The feedback loop: One of the primary goals of analytics is to provide feedback to the various AI models inside Luigi’s Box. For this to work effectively, it is vital that products are identified using the same identifier in analytics events as used when indexing the data. Changing the identity of an object will cause the models to forget everything they have learned about it historically.
- Interaction data: A complete picture of user interaction is formed by several key pieces of information. This includes the
Listof products a user saw, theQuerythey typed, anyFiltersthey applied to narrow the results, and anyConversions(like adding an item to the cart). - Bootstrapping with historical data: To shorten the initial ramp-up period, Luigi’s Box allows for the import of past or offline transactions. By uploading historical purchase data, services like Behavioral Recommendations and Personalization can achieve full effectiveness much faster, as the AI models are trained on this data.
Was this page helpful?
Thanks.