Get ecommerce sources
GET
/api/sites/{id}/ecommerce/sources
const url = 'https://hitkeep.com/api/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ecommerce/sources';const options = {method: 'GET', headers: {cookie: 'hk_token=<hk_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://hitkeep.com/api/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ecommerce/sources \ --cookie hk_token=<hk_token>Returns revenue and order counts grouped by UTM source, medium, campaign, and referrer.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string format: uuid
Query Parameters
Section titled “Query Parameters ” from
string format: date-time
to
string format: date-time
filter
string
Filter in form type:value (repeatable). Supported types: path, hostname, referrer, referrer_host, device, country, browser, language, utm_campaign, utm_content, utm_medium, utm_source, utm_term.
filter_type
string
filter_value
string
item_id
string
item_name
string
limit
integer
Responses
Section titled “ Responses ”Ecommerce sources
Media type application/json
Array<object>
object
orders
integer
referrer
string
revenue
number
utm_campaign
string
utm_medium
string
utm_source
string
Example generated
[ { "orders": 1, "referrer": "example", "revenue": 1, "utm_campaign": "example", "utm_medium": "example", "utm_source": "example" }]