Links
Get link variant analytics
Requires link.read. Returns active variants and their traffic, conversions and revenue for the supplied date interval. conversionRate is conversions divided by visitors (0 when there are no visitors). Both date strings must be nonempty; this legacy endpoint does not validate their format.
GET
/
v1
/
projects
/
{id}
/
links
/
{linkId}
/
analytics
Get link variant analytics
curl --request GET \
--url https://api.trackup.me/v1/projects/{id}/links/{linkId}/analytics \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.trackup.me/v1/projects/{id}/links/{linkId}/analytics"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.trackup.me/v1/projects/{id}/links/{linkId}/analytics', 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://api.trackup.me/v1/projects/{id}/links/{linkId}/analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$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://api.trackup.me/v1/projects/{id}/links/{linkId}/analytics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.trackup.me/v1/projects/{id}/links/{linkId}/analytics")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trackup.me/v1/projects/{id}/links/{linkId}/analytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"variants": [
{
"requests": 120,
"visitors": 100,
"conversions": 8,
"revenue": 399.2,
"urlId": "55555555-5555-4555-8555-555555555555",
"pageId": "33333333-3333-4333-8333-333333333333",
"salesPlatformId": null,
"salesPlatformName": "",
"name": "Landing A",
"pageName": "Autumn offer",
"weight": 50,
"conversionRate": 0.08
}
],
"totals": {
"requests": 120,
"visitors": 100,
"conversions": 8,
"revenue": 399.2
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"errors": {}
}{
"error": "<string>",
"message": "<string>"
}Query Parameters
⌘I
Get link variant analytics
curl --request GET \
--url https://api.trackup.me/v1/projects/{id}/links/{linkId}/analytics \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.trackup.me/v1/projects/{id}/links/{linkId}/analytics"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.trackup.me/v1/projects/{id}/links/{linkId}/analytics', 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://api.trackup.me/v1/projects/{id}/links/{linkId}/analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$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://api.trackup.me/v1/projects/{id}/links/{linkId}/analytics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.trackup.me/v1/projects/{id}/links/{linkId}/analytics")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trackup.me/v1/projects/{id}/links/{linkId}/analytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"variants": [
{
"requests": 120,
"visitors": 100,
"conversions": 8,
"revenue": 399.2,
"urlId": "55555555-5555-4555-8555-555555555555",
"pageId": "33333333-3333-4333-8333-333333333333",
"salesPlatformId": null,
"salesPlatformName": "",
"name": "Landing A",
"pageName": "Autumn offer",
"weight": 50,
"conversionRate": 0.08
}
],
"totals": {
"requests": 120,
"visitors": 100,
"conversions": 8,
"revenue": 399.2
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"errors": {}
}{
"error": "<string>",
"message": "<string>"
}