curl --request POST \
--url https://api.example.com/api/v1/admin/brand-library/brands/{advertiser_id}/global-tracking \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/admin/brand-library/brands/{advertiser_id}/global-tracking"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/admin/brand-library/brands/{advertiser_id}/global-tracking', 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.example.com/api/v1/admin/brand-library/brands/{advertiser_id}/global-tracking",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://api.example.com/api/v1/admin/brand-library/brands/{advertiser_id}/global-tracking"
req, _ := http.NewRequest("POST", 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.post("https://api.example.com/api/v1/admin/brand-library/brands/{advertiser_id}/global-tracking")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/admin/brand-library/brands/{advertiser_id}/global-tracking")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"advertiser_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_gtb": true,
"already_tracked": true,
"tracking_countries": []
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Track Brand Globally
Set GTB — register an advertiser in the global refresh registry.
The inverse of untrack_brand and the admin counterpart of the
user-facing Track button, minus everything that button does on the
tenant’s behalf. It registers the advertiser for the nightly refresh sweep
and nothing else: no watchlist, no watchlist item, no
user_ad_library_tracked_advertisers row, no global-promotion quota
consumed, no owning brand implied. An operator tracking a brand for the
platform is not a tenant tracking it for themselves, and the census must
not start reporting a UTB that no user asked for.
It also does not enqueue an initial refresh. Registration is the whole action; the nightly sweep is what collects, on its own schedule and budget. Kicking off an immediate paid fetch from an admin census button would be acquisition the operator did not ask for.
Written through promote_advertiser_to_global_tracking — the public
seam over _ensure_global_tracking, whose entire body is a passthrough
to it. Same ON CONFLICT DO NOTHING insert and market merge; this
module reaches for the public name for the same reason it imports the
public untrack_advertiser_globally rather than that function’s
internals.
Two refusals, both 409, both re-derived here rather than trusted from the
census page (see global_tracking_block_reason for why each holds).
They are checked BEFORE the already-tracked no-op: answering “200, tracked”
for a tenant_private row would report a healthy state for exactly the
state this endpoint exists to keep out of the paid sweep. Already-tracked
is then a 200 with already_tracked=true — no write, no audit row, no
commit.
Both the audit row and the response report the countries the registry row
HOLDS after the write, re-read rather than assumed: the advertiser lock
does not cover the registry table, so a tenant’s own Track landing in the
same window makes the stored value the union of both
(persisted_tracking_countries).
curl --request POST \
--url https://api.example.com/api/v1/admin/brand-library/brands/{advertiser_id}/global-tracking \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/admin/brand-library/brands/{advertiser_id}/global-tracking"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/admin/brand-library/brands/{advertiser_id}/global-tracking', 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.example.com/api/v1/admin/brand-library/brands/{advertiser_id}/global-tracking",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://api.example.com/api/v1/admin/brand-library/brands/{advertiser_id}/global-tracking"
req, _ := http.NewRequest("POST", 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.post("https://api.example.com/api/v1/admin/brand-library/brands/{advertiser_id}/global-tracking")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/admin/brand-library/brands/{advertiser_id}/global-tracking")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"advertiser_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_gtb": true,
"already_tracked": true,
"tracking_countries": []
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
What the global-tracking registration left on the row.
is_gtb is always True on a 2xx — the endpoint either registered
the advertiser or found it already registered. already_tracked
separates those two so the client can tell a real write from a no-op
without diffing its own stale row state.
Was this page helpful?