Get UTM attribution
curl --request GET \
--url https://enterprise-api.avoca.ai/api/v1/teams/{teamId}/analytics/utm \
--header 'Authorization: Bearer <token>'import requests
url = "https://enterprise-api.avoca.ai/api/v1/teams/{teamId}/analytics/utm"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://enterprise-api.avoca.ai/api/v1/teams/{teamId}/analytics/utm', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://enterprise-api.avoca.ai/api/v1/teams/{teamId}/analytics/utm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://enterprise-api.avoca.ai/api/v1/teams/{teamId}/analytics/utm"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://enterprise-api.avoca.ai/api/v1/teams/{teamId}/analytics/utm")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://enterprise-api.avoca.ai/api/v1/teams/{teamId}/analytics/utm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"source": "google",
"medium": "cpc",
"campaign": "<string>",
"term": "<string>",
"content": "<string>",
"sessions": 123,
"conversions": 123
}
],
"meta": {
"team_id": 123,
"start_date": "<string>",
"end_date": "<string>",
"timezone": "<string>"
}
}{
"error": "<string>",
"message": "<string>"
}Analytics (v1)
Get UTM attribution
UTM attribution data. Same query parameters as funnel. Requires the read:scheduler_analytics permission.
GET
/
api
/
v1
/
teams
/
{teamId}
/
analytics
/
utm
Get UTM attribution
curl --request GET \
--url https://enterprise-api.avoca.ai/api/v1/teams/{teamId}/analytics/utm \
--header 'Authorization: Bearer <token>'import requests
url = "https://enterprise-api.avoca.ai/api/v1/teams/{teamId}/analytics/utm"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://enterprise-api.avoca.ai/api/v1/teams/{teamId}/analytics/utm', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://enterprise-api.avoca.ai/api/v1/teams/{teamId}/analytics/utm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://enterprise-api.avoca.ai/api/v1/teams/{teamId}/analytics/utm"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://enterprise-api.avoca.ai/api/v1/teams/{teamId}/analytics/utm")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://enterprise-api.avoca.ai/api/v1/teams/{teamId}/analytics/utm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"source": "google",
"medium": "cpc",
"campaign": "<string>",
"term": "<string>",
"content": "<string>",
"sessions": 123,
"conversions": 123
}
],
"meta": {
"team_id": 123,
"start_date": "<string>",
"end_date": "<string>",
"timezone": "<string>"
}
}{
"error": "<string>",
"message": "<string>"
}Authorizations
API key in the format avoca_<64 hex characters>
Path Parameters
The team ID
Query Parameters
Start of date range (ISO 8601; default 7 days ago)
End of date range (ISO 8601; default now)
IANA timezone for date calculations (default America/New_York)
Filter to a specific scheduler
Was this page helpful?
⌘I