My Site Optimization
  • Home
  • Blog
  • Pricing
  • Docs
  • Login
  • Create Account
Select Page

Developer

2
  • Authentication
  • Submitting Metrics

Platform

1
  • Getting Started
View Categories
  • Home
  • Docs
  • Developer
  • Submitting Metrics

Submitting Metrics

< 1 min read

Below you will find instructions for how to submit metric data for your experiment programmatically.

Submit Metric Data #

Endpoint: POST https://app.mysiteoptimization.com/api/1.1/wf/metric?api_key=[EXPERIMENT_API_KEY]

Content Type: application/json

Authentication: Use the token returned from the response above as a Bearer token in your Authentication header during the request.

You can find your experiment’s api_key (make sure to include as query parameter in request) by opening the Experiment Wizard by clicking “Edit” on your desired experiment from the dashboard. The key will be available at the bottom of the page.

Data:

{
"source":"Metric datasource goes here",
"value": "1000.00",
"variant_id": "B", // uppercase variant code, A or B
"kpi": "revenue" // kpi name (must be provided exactly as saved)
}

Response:

{
"status": "success",
"response": {
"metric_id": "api-metric-5"
}
}

Updated on October 20, 2025

What are your Feelings

  • Happy
  • Normal
  • Sad

Share This Article :

  • Facebook
  • X
  • LinkedIn
  • Pinterest
Authentication

Powered by BetterDocs

Submit a Comment Cancel reply

Your email address will not be published. Required fields are marked *

Table of Contents
  • Submit Metric Data
Copyright 2025 My Site Optimization
Loading...

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.