# Analyze Docs

***

## Reports

### Everything you need to know about AB Genius reporting and how to read your data.

AB Genius generates real-time reports for every experiment. Reports are available for any experiment that has reached **Running**, **Stopped**, or **Ended** status.

### Where to find reports

There are two reporting surfaces in AB Genius:

* **Dashboard** — The main dashboard (accessible from the app home screen) shows high-level KPI cards across your store: running experiments, total sessions, add to cart rate, checkout rate, and conversion rate. It also lists your page split experiments with status badges and quick-access links.
* **Results tab (per experiment)** — Each individual experiment has its own Results tab with detailed metrics, group comparisons, audience breakdowns, and time series charts. This is where you do your analysis.

### Dashboard KPIs

The dashboard gives you a quick pulse check across your experimentation program:

* **Running Experiments** — how many experiments are currently active
* **Sessions** — total visitor sessions tracked by AB Genius
* **Add to Cart Rate** — percentage of sessions that resulted in an add-to-cart action
* **Checkout Rate** — percentage of sessions that reached checkout
* **Conversion Rate** — percentage of sessions that completed a purchase

These are aggregate numbers across your store, not specific to any single experiment. For experiment-level analysis, go to the Results tab of the specific test.

### Experiment-level reports

The Results tab for each experiment includes:

* **Key Metrics Panel** — Side-by-side comparison of two selected groups across all tracked metrics: conversion rate, revenue per visitor, AOV, add to cart rate, and abandoned cart rate. Each metric shows the absolute values, percentage difference, and a monthly impact projection.
* **Time Series Chart** — Daily visitors and conversions per group, plotted over the experiment's lifetime. Use the date range filter to zoom into specific periods. This is useful for spotting trends, checking for consistent performance, and identifying days where external factors (promotions, ad spend changes) may have influenced results.
* **Audience Breakdown** — Tabbed views that segment your results by:
  * All Visitors (aggregate)
  * Desktop vs Mobile
  * New vs Returning Visitors
  * Traffic Source Channels
  * Source Sites (specific referrer domains)
  * Top 10 Countries
  * Browser type
* **Win Banner** — Appears when one group achieves statistical significance over the others on the primary metric. Shows which group is winning and by what percentage. Includes the **Declare Winner** button.

### Reading the percentage difference

When comparing two groups, the percentage difference is calculated relative to the control:

A positive percentage (green) means the variant is outperforming the control.\
A negative percentage (red) means the variant is underperforming.

Example: If Control has an RPV of $2.40 and Variant A has an RPV of $2.88, the percentage difference is +20%.

### Filtering by date range

The Results tab includes a date range picker in the Metrics section. This lets you view results for any custom time period within the experiment's runtime.

This is useful when:

* You want to exclude the first day or two of data (which can be noisy).
* You ran a promotion during the test and want to see results with and without the promotional period.
* You want to compare weekday vs weekend performance.

### Exporting data

AB Genius does not currently have a built-in CSV export feature. To capture your results data, you can:

* Take screenshots of the Results tab.
* Manually record the metrics in a spreadsheet.
* Contact support at <info@abgenius.io> if you need a data export for a specific experiment.

***

## Tracking

### How AB Genius tracks visitors, events, and experiment data.

AB Genius uses a combination of browser cookies, a lightweight storefront script, and Shopify's Web Pixel extension to track everything needed to run experiments and measure results.

### Visitor identification

Every visitor to your store receives an anonymous visitor ID, stored in a browser cookie called `ab_vid`. This cookie persists for 1 year.

* The ID format is `v_` followed by a UUID (e.g. `v_550e8400-e29b-41d4-a716-446655440000`).
* The ID contains no personal information.
* Returning visitors are recognised by their existing `ab_vid` cookie.
* If a visitor clears their cookies or uses a different browser/device, they receive a new ID and are treated as a new visitor.

### Group assignment

When a visitor lands on a page with an active experiment:

{% stepper %}
{% step %}
The AB Genius storefront script (`ab-live.js`) checks for an existing cached assignment in the `ab_data` cookie (valid for 1 hour).
{% endstep %}

{% step %}
If no cache exists, the script makes a single API call to the AB Genius backend. This call assigns the visitor to a group (based on weighted round-robin distribution) and returns any experiment data (prices, content modifications, or redirect instructions).
{% endstep %}

{% step %}
The assignment is stored in both the `ab_data` cookie (for fast client-side access) and the AB Genius database (permanent record).
{% endstep %}

{% step %}
The visitor consistently sees the same group assignment on every subsequent visit.

Assignment records include full attribution data: UTM parameters, referrer URL, landing page, device type, country, and traffic source.
{% endstep %}
{% endstepper %}

### Event tracking

AB Genius tracks funnel events through Shopify's Web Pixel extension. The Web Pixel runs in a sandboxed browser environment and does not affect page rendering or load speed.

Events are captured and transmitted asynchronously.

Tracked events:

| Event                  | When it fires                    | Deduplication                                  |
| ---------------------- | -------------------------------- | ---------------------------------------------- |
| Product View           | Visitor views a product page     | Once per visitor per product per day           |
| Add to Cart            | Item added to cart               | Once per visitor per product per 30 minutes    |
| Remove from Cart       | Item removed from cart           | None                                           |
| Checkout Started       | Visitor reaches checkout         | Once per visitor per experiment per 30 minutes |
| Purchase               | Order completed                  | Once per order ID (permanent)                  |
| Payment Info Submitted | Payment info entered at checkout | None                                           |

### Deduplication

Deduplication prevents the same event from being counted multiple times. For example, if a visitor views the same product page three times in one day, only one Product View event is recorded. If they add the same product to cart twice within 30 minutes, only one Add to Cart event is recorded.

Purchase events are deduplicated by order ID permanently — the same order is never counted twice regardless of timing.

### Attribution

Each event is attributed to the visitor's assigned experiment group. This is how AB Genius knows which group generated which conversions and revenue.

Attribution is automatic. You don't need to configure any tracking codes, UTM parameters, or analytics integrations. The Web Pixel extension handles everything natively within Shopify.

### What the Web Pixel tracks

The AB Genius Web Pixel captures:

* Product view events (product ID, variant ID, page URL)
* Add to cart events (product ID, variant ID, quantity)
* Checkout started events
* Purchase events (order ID, total revenue, line items, discount codes)

All events are associated with the visitor's anonymous `ab_vid` and their experiment group assignment.

### Verifying tracking is active

If you're seeing zero visitors or zero conversions in your results:

{% stepper %}
{% step %}
Check the Web Pixel: Go to Shopify Admin → Settings → Customer Events. Verify that **AB Genius Web Pixel** is listed and enabled.
{% endstep %}

{% step %}
Check the app block: Go to Online Store → Themes → Customise → App Embeds. Verify that **AB Genius AB Live** is toggled ON and saved in your live theme.
{% endstep %}

{% step %}
Check in incognito: Visit your store in an incognito/private browser window with an active experiment running. Open browser developer tools (F12) and check for any JavaScript errors from the AB Genius domain.
{% endstep %}

{% step %}
Confirm real traffic: The Shopify theme editor preview does not trigger tracking. You need real visitors on the live storefront.
{% endstep %}
{% endstepper %}

### Tracking and privacy

AB Genius tracking is anonymous. No personal identifying information is collected. Visitor IDs are randomly generated and cannot be linked back to individual people.

For full details, see the [Data & Privacy](https://abgenius.gitbook.io/abgenius-docs/documentation/getting-started/broken-reference) section.

***

## Tracking Setup

### Verifying that tracking is configured correctly on your store.

AB Genius tracking is designed to work automatically after installation. There are two components that need to be active for tracking to function.

### Component 1: AB Genius App Block

The app block (`ab-live`) delivers the storefront script that handles visitor assignment and experiment delivery. Without it, experiments don't run and no visitor data is collected.

How to verify:

{% stepper %}
{% step %}
Go to **Shopify Admin → Online Store → Themes → Customise**.
{% endstep %}

{% step %}
Open **App Embeds** (usually under a settings/gear icon in the left sidebar).
{% endstep %}

{% step %}
Find **AB Genius AB Live** and confirm it's toggled **ON**.
{% endstep %}

{% step %}
Click **Save**.

This must be enabled on your **live theme**, not just a draft or unpublished theme.
{% endstep %}
{% endstepper %}

### Component 2: AB Genius Web Pixel

The Web Pixel extension tracks purchase and funnel events. Without it, you'll see visitor data but no conversion or revenue data.

How to verify:

{% stepper %}
{% step %}
Go to **Shopify Admin → Settings → Customer Events**.
{% endstep %}

{% step %}
Find **AB Genius Web Pixel** in the list of active pixels.
{% endstep %}

{% step %}
Confirm it's **enabled**.
{% endstep %}
{% endstepper %}

The Web Pixel is typically enabled automatically during app installation. If it's missing, try uninstalling and reinstalling AB Genius, or contact support at <info@abgenius.io>.

### Component 3 (Price Tests only): Cart Transform Function

For price tests, the Cart Transform Function ensures the A/B test price is applied at actual checkout.

How to verify:

{% stepper %}
{% step %}
Go to **Shopify Admin → Settings → Checkout**.
{% endstep %}

{% step %}
Look for **Functions** or **Cart Transform**.
{% endstep %}

{% step %}
Confirm **AB Genius Cart Transformer** is enabled.

Without this, price tests will display correctly on the storefront but charge the original Shopify price at checkout.
{% endstep %}
{% endstepper %}

### Testing your setup

The fastest way to confirm everything is working:

{% stepper %}
{% step %}
Create a simple test experiment (or use an existing Draft).
{% endstep %}

{% step %}
Start the experiment.
{% endstep %}

{% step %}
Open your store in an **incognito browser window**.
{% endstep %}

{% step %}
Visit the page where the experiment runs.
{% endstep %}

{% step %}
Check the AB Genius Results tab — you should see at least 1 visitor within a few minutes.
{% endstep %}

{% step %}
If you see the visitor in your results, tracking is working correctly. If running a price test, add the product to cart and proceed toward checkout to confirm the test price carries through.
{% endstep %}
{% endstepper %}
