Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.elasticfunnels.io/llms.txt

Use this file to discover all available pages before exploring further.

Get Available Metrics

Retrieve the list of available metrics you can track.
brand
string
required
The brand/project ID
split_test_id
string
Filter metrics relevant to split tests (optional)
Request
GET /api/brands/{brand}/analytics/metrics
cURL
curl https://app.elasticfunnels.io/api/brands/{brand_id}/analytics/metrics \
  -H "EF-Access-Key: your_api_key_here"
{
  "revenue": {
    "type": "revenue",
    "name": "Revenue",
    "base": "revenue",
    "color": "#10b981",
    "icon": "<svg>...</svg>",
    "info": "Total revenue from orders",
    "group_name": "Sales",
    "modules": ["conversions"]
  },
  "sales": {
    "type": "sales",
    "name": "Sales",
    "base": "sales",
    "color": "#3b82f6",
    "group_name": "Sales",
    "modules": ["conversions"]
  },
  "page_views": {
    "type": "page_views",
    "name": "Page Views",
    "base": "page_views",
    "group_name": "Traffic",
    "modules": ["tracking"]
  }
}

Get Metrics Data

Retrieve actual metrics values for a date range.
brand
string
required
The brand/project ID
start
string
required
Start date (ISO 8601 format)
end
string
required
End date (ISO 8601 format)
tz
string
Timezone (e.g., “America/New_York”)
selected_metrics
array
Array of metric keys to retrieve
filter[field]
string
Filter by specific field values (e.g., filter[aff_id]=123)
page_id
string
Filter by specific page
split_test_id
string
Filter by specific split test
engine
string
Optional. Only use when your integration or account documentation specifies a value.
Request
GET /api/brands/{brand}/analytics/metrics/data
cURL
curl "https://app.elasticfunnels.io/api/brands/{brand_id}/analytics/metrics/data?start=2024-12-01T00:00:00Z&end=2024-12-10T23:59:59Z&selected_metrics[]=revenue&selected_metrics[]=sales&selected_metrics[]=page_views" \
  -H "EF-Access-Key: your_api_key_here"
{
  "revenue": {
    "value": 15750.00,
    "formatted_value": "$15,750.00",
    "previous_value": 12300.00,
    "change": 28.05,
    "change_symbol": "+",
    "current_range": "Dec 1 - Dec 10",
    "previous_range": "Nov 20 - Nov 30",
    "previous_range_label": "Previous Period",
    "lower_is_better": false,
    "neutral": false
  },
  "sales": {
    "value": 315,
    "formatted_value": "315",
    "previous_value": 246,
    "change": 28.05,
    "change_symbol": "+",
    "lower_is_better": false
  },
  "page_views": {
    "value": 10500,
    "formatted_value": "10,500",
    "previous_value": 8750,
    "change": 20.00,
    "change_symbol": "+"
  }
}

Get Analytics Cards

For the full card catalog (batch vs per-card URLs, subscription analytics, split-test charts), see Analytics dashboard cards. Retrieve specialized analytics cards data (video analytics, fulfillment metrics, etc.).
brand
string
required
The brand/project ID
start
string
required
Start date (ISO 8601 format)
end
string
required
End date (ISO 8601 format)
enabled_cards
array
Array of card types to retrieve
Request
GET /api/brands/{brand}/analytics/metrics/cards
cURL
curl "https://app.elasticfunnels.io/api/brands/{brand_id}/analytics/metrics/cards?start=2024-12-01T00:00:00Z&end=2024-12-10T23:59:59Z&enabled_cards[]=video_play_rate&enabled_cards[]=time_on_page_before_purchase" \
  -H "EF-Access-Key: your_api_key_here"
{
  "cards": {
    "video_analytics": {
      "video_play_rate": {
        "value": 0.65,
        "formatted_value": "65%"
      },
      "average_video_watch_time": {
        "value": 185.5,
        "formatted_value": "3:05"
      }
    },
    "advanced_metrics": {
      "time_on_page_before_purchase": {
        "value": 320,
        "formatted": "5:20",
        "sample_size": 315
      }
    }
  },
  "enabled_cards": ["video_play_rate", "time_on_page_before_purchase"],
  "filters_applied": {
    "date_range": ["2024-12-01T00:00:00Z", "2024-12-10T23:59:59Z"],
    "page_id": null,
    "split_test_id": null
  }
}

Get Grouped Metrics

Retrieve metrics grouped by a specific field (e.g., by product, page, affiliate).
brand
string
required
The brand/project ID
field
string
required
Grouping field: product, page, aff_id, day, hour, country, device, utm_source, etc.
start
string
required
Start date (ISO 8601 format)
end
string
required
End date (ISO 8601 format)
selected_metrics
array
Array of metric keys to retrieve
Request
GET /api/brands/{brand}/analytics/metrics/{field}/data
cURL
curl "https://app.elasticfunnels.io/api/brands/{brand_id}/analytics/metrics/product/data?start=2024-12-01T00:00:00Z&end=2024-12-10T23:59:59Z&selected_metrics[]=revenue&selected_metrics[]=sales" \
  -H "EF-Access-Key: your_api_key_here"
[
  {
    "row_key": "PROD-001",
    "row_name": "Main Product",
    "revenue": {
      "value": 9875.00,
      "formatted_value": "$9,875.00"
    },
    "sales": {
      "value": 198,
      "formatted_value": "198"
    }
  },
  {
    "row_key": "PROD-002",
    "row_name": "Upsell Product",
    "revenue": {
      "value": 5875.00,
      "formatted_value": "$5,875.00"
    },
    "sales": {
      "value": 117,
      "formatted_value": "117"
    }
  }
]

Export Grouped Metrics

Export grouped metrics to CSV or Excel.
brand
string
required
The brand/project ID
field
string
required
Grouping field
metrics
array
Array of metric keys to export
format
string
Export format: csv or excel (default: csv)
date_range
object
Date range object with start/end dates
Request
POST /api/brands/{brand}/analytics/metrics/{field}/export
cURL
curl -X POST "https://app.elasticfunnels.io/api/brands/{brand_id}/analytics/metrics/product/export" \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "metrics": ["revenue", "sales", "aov"],
    "format": "csv",
    "date_range": {
      "start": "2024-12-01",
      "end": "2024-12-10"
    }
  }'
{
  "message": "Export has been queued. You will receive an email when it's ready.",
  "status": "queued",
  "field": "product"
}

Available Grouping Fields

  • hour - Hour of day (0-23)
  • day - Calendar day
  • week - Week number
  • month - Month
  • year - Year
  • hour_of_day - Time grouping
  • aff_id - Affiliate (requires permission)
  • subid - Sub ID
  • merchant_id - Merchant
  • page - Landing page
  • product - Product
  • funnel_id - Funnel
  • country - Visitor country
  • region - Visitor region
  • shipping_country - Shipping destination
  • shipping_state - Shipping state
  • device - Device type (desktop/mobile/tablet)
  • os - Operating system
  • browser - Browser type
  • screen_resolution - Screen size
  • language - Browser language
  • utm_source - Traffic source
  • utm_medium - Marketing medium
  • utm_campaign - Campaign
  • utm_term - Keyword/term
  • utm_content - Ad content
  • referrer - Referring website

Compound Grouping

You can group by multiple fields simultaneously using semicolon separation:
GET /api/brands/{brand}/analytics/metrics/product;page/data
This groups metrics by both product AND page.

Filtering

Apply filters using the filter[field] query parameter:
# Filter by affiliate
GET /api/brands/{brand}/analytics/metrics/data?filter[aff_id]=123

# Filter by device
GET /api/brands/{brand}/analytics/metrics/data?filter[device]=mobile

# Filter by country
GET /api/brands/{brand}/analytics/metrics/data?filter[country]=US

# Multiple filters
GET /api/brands/{brand}/analytics/metrics/data?filter[device]=mobile&filter[country]=US

Custom Metrics

You can create custom metrics using formulas:
cURL
curl "https://app.elasticfunnels.io/api/brands/{brand_id}/analytics/metrics/data?start=2024-12-01T00:00:00Z&end=2024-12-10T23:59:59Z&selected_metrics[]=metric_0" \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "metric": {
      "0": {
        "name": "Profit Margin",
        "formula": "($revenue - $cogs - $ad_spend) / $revenue * 100",
        "as": "pct"
      }
    }
  }'
Custom metric formulas support:
  • Basic math operators: +, -, *, /, ()
  • Variables: $metric_name (e.g., $revenue, $sales)
  • Format types: currency, pct (percentage), time, number

Common Metrics

MetricDescriptionModule Required
revenueTotal revenueconversions
salesNumber of ordersconversions
aovAverage order valueconversions
conversion_rateConversion percentageconversions, tracking
page_viewsTotal page viewstracking
sessionsUnique sessionstracking
engagement_rateUser engagementtracking
time_on_pageAvg time on pagetracking
ad_spendAdvertising costintegrations
roasReturn on ad spendconversions, integrations
cogsCost of goods soldconversions
net_revenueRevenue minus costsconversions

Notes

  • All dates should be in ISO 8601 format
  • The system automatically compares current period with previous period of equal length
  • Some metrics require specific modules to be enabled
  • Permission-restricted metrics (like aff_id) require appropriate user permissions
  • Analytics storage may vary by brand configuration
When grouping by aff_id, ensure your API key’s user has the affiliates.view permission

UTM Performance

Break down conversions and revenue by a single UTM dimension across a date range.
GET /api/brands/{brand}/utm-performance/{type}
brand
string
required
The brand/project ID
type
string
required
UTM dimension: utm_source, utm_medium, utm_campaign, utm_term, utm_content
start
string
required
Start date (ISO 8601)
end
string
required
End date (ISO 8601)
tz
string
Timezone (e.g. America/New_York)
cURL
curl "https://app.elasticfunnels.io/api/brands/{brand_id}/utm-performance/utm_source?start=2024-12-01T00:00:00Z&end=2024-12-10T23:59:59Z" \
  -H "EF-Access-Key: your_api_key_here"
[
  { "utm_source": "facebook", "revenue": 9200.00, "sales": 184, "aov": 50.00, "conversion_rate": 0.038, "page_views": 4842 },
  { "utm_source": "google",   "revenue": 4100.00, "sales": 82,  "aov": 50.00, "conversion_rate": 0.041, "page_views": 2000 }
]

Specific Analytics Cards

Individual endpoints for specialised analytics data. All accept start and end (ISO 8601) query params.

Time Before First Purchase

How long visitors waited before converting — useful for identifying checkout hesitation.
GET /api/brands/{brand}/analytics/metrics/time-before-first-purchase
{
  "buckets": [
    { "label": "< 1 min",   "count": 92,  "pct": 0.29 },
    { "label": "1–5 min",   "count": 118, "pct": 0.37 },
    { "label": "5–15 min",  "count": 64,  "pct": 0.20 },
    { "label": "15–60 min", "count": 30,  "pct": 0.10 },
    { "label": "> 1 hour",  "count": 11,  "pct": 0.04 }
  ],
  "median_seconds": 187,
  "sample_size": 315
}

Add-to-Carts by Video Watch Time

Identifies at which point in a video visitors add to cart — use to find optimal CTA placement.
GET /api/brands/{brand}/analytics/metrics/add-to-carts-by-video-time
{
  "buckets": [
    { "video_pct": 0,   "atcs": 12 },
    { "video_pct": 25,  "atcs": 31 },
    { "video_pct": 50,  "atcs": 54 },
    { "video_pct": 75,  "atcs": 29 },
    { "video_pct": 100, "atcs": 8 }
  ]
}

Customer Gender Distribution

GET /api/brands/{brand}/analytics/metrics/customer-gender
{
  "male":    { "count": 182, "pct": 0.58 },
  "female":  { "count": 121, "pct": 0.38 },
  "unknown": { "count": 12,  "pct": 0.04 }
}

Video Completion by Gender

GET /api/brands/{brand}/analytics/metrics/video-completion-by-gender
{
  "male":   { "avg_completion_pct": 64, "sample": 182 },
  "female": { "avg_completion_pct": 71, "sample": 121 }
}

Products by Pages

Conversion performance broken down by page → product pair.
GET /api/brands/{brand}/analytics/metrics/products-by-pages/data
GET /api/brands/{brand}/analytics/metrics/products-by-pages/summary
[
  {
    "page_id": 101, "page_title": "Nutra Landing",
    "product_id": 5, "product_title": "1 Bottle",
    "revenue": 4600.00, "sales": 92, "conversion_rate": 0.038
  }
]

Upsell Take Rate

GET /api/brands/{brand}/analytics/metrics/upsell-take-rate/summary
{
  "upsells": [
    { "product_id": 8, "product_title": "3-Bottle Bundle", "shown": 315, "taken": 87, "take_rate": 0.276, "revenue": 7830.00 }
  ]
}

Units Sold

GET /api/brands/{brand}/analytics/metrics/units-sold/summary
{
  "total_units": 847,
  "by_product": [
    { "product_id": 5, "title": "1 Bottle",   "units": 315 },
    { "product_id": 6, "title": "3 Bottles",  "units": 532 }
  ]
}

Report Builder

Build, save, and export custom cross-dimensional analytics reports.

Generate Report

POST /api/brands/{brand}/analytics/reports/generate
group_by
array
required
Dimension keys to group by (e.g. ["product", "utm_source"]). See grouping fields.
metrics
array
required
Metric keys (e.g. ["revenue", "sales", "conversion_rate"])
start
string
required
Start date (ISO 8601)
end
string
required
End date (ISO 8601)
filters
object
Key-value filters (e.g. {"device": "mobile", "country": "US"})
limit
number
Max rows returned (default: 100)
cURL
curl -X POST "https://app.elasticfunnels.io/api/brands/{brand_id}/analytics/reports/generate" \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "group_by": ["utm_source", "product"],
    "metrics": ["revenue", "sales", "conversion_rate"],
    "start": "2024-12-01T00:00:00Z",
    "end": "2024-12-10T23:59:59Z",
    "filters": {"device": "mobile"},
    "limit": 50
  }'
{
  "rows": [
    {
      "utm_source": "facebook",
      "product": "1 Bottle",
      "revenue": { "value": 4600.00, "formatted_value": "$4,600.00" },
      "sales": { "value": 92, "formatted_value": "92" },
      "conversion_rate": { "value": 0.038, "formatted_value": "3.8%" }
    }
  ],
  "total_rows": 14,
  "truncated": false
}

Get Available Grouping Fields (Report Builder)

GET /api/brands/{brand}/analytics/reports/grouping-fields

Get Reporting Periods

GET /api/brands/{brand}/analytics/reports/reporting-periods
Returns available pre-set periods: today, yesterday, last_7_days, last_30_days, this_month, last_month, etc.

Save Report

POST /api/brands/{brand}/analytics/reports/save
name
string
required
Report name
config
object
required
Same body as generate — stored and re-runnable on demand.

List Saved Reports

GET /api/brands/{brand}/analytics/reports/saved

Load Saved Report

GET /api/brands/{brand}/analytics/reports/saved/{reportId}

Export Saved Report

POST /api/brands/{brand}/analytics/reports/saved/{reportId}/export

Delete Saved Report

DELETE /api/brands/{brand}/analytics/reports/saved/{reportId}

Export Current Report

POST /api/brands/{brand}/analytics/reports/export
format
string
csv (default) or excel
Other body fields same as Generate. Queues an export job and emails a download link when complete.
{
  "message": "Export has been queued. You will receive an email when it's ready.",
  "status": "queued"
}

Analytics Segments

Create and manage reusable audience segments for filtering reports.

List Segments

GET /api/brands/{brand}/analytics/segments

Get Segment

GET /api/brands/{brand}/analytics/segments/{segment}

Create Segment

POST /api/brands/{brand}/analytics/segments
name
string
required
Segment name
conditions
array
required
Array of condition objects. Each has field, operator (eq, neq, gte, lte, in), and value.
operator
string
How conditions combine: and (default) or or
cURL
curl -X POST "https://app.elasticfunnels.io/api/brands/{brand_id}/analytics/segments" \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "High-Value Mobile Buyers",
    "operator": "and",
    "conditions": [
      { "field": "device",  "operator": "eq",  "value": "mobile" },
      { "field": "revenue", "operator": "gte", "value": 100 }
    ]
  }'
{
  "id": 4,
  "name": "High-Value Mobile Buyers",
  "operator": "and",
  "conditions": [
    { "field": "device",  "operator": "eq",  "value": "mobile" },
    { "field": "revenue", "operator": "gte", "value": 100 }
  ],
  "brand_id": 42,
  "created_at": "2024-12-11T09:00:00.000000Z"
}

Update Segment

PUT /api/brands/{brand}/analytics/segments/{segment}

Delete Segment

DELETE /api/brands/{brand}/analytics/segments/{segment}

Preview Segment

Run a segment definition against live data without saving it.
POST /api/brands/{brand}/analytics/segments/preview
Body: same as Create.
{
  "count": 487,
  "sample": [
    { "session_id": "abc123", "revenue": 147.00, "device": "mobile" }
  ]
}

Install Default Segments

POST /api/brands/{brand}/analytics/segments/install-defaults
Installs a curated starter set (e.g. “New Buyers”, “Repeat Customers”, “Abandoned Carts”).