Integration
Preview integration settings
Preview how unsaved settings would change an integration’s figures for one mapped platform ID. Returns before and after totals; nothing is saved. Only works for modules that support previews (currently Google Analytics), and calls the partner platform. Takes the encoded integration ID (iid).
POST
/
v1
/
integration
/
{id}
/
preview
Preview integration settings
curl --request POST \
--url https://api.tagdeliver.com/v1/integration/{id}/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"platform_id": "123456789",
"settings": {
"publisher_own_domain": true,
"traffic_filters": [
{
"dimension": "sessionSource",
"match": "contains",
"values": [
"aggregator.example.net"
]
}
]
},
"start": "2026-11-09",
"end": "2026-11-15"
}
'import requests
url = "https://api.tagdeliver.com/v1/integration/{id}/preview"
payload = {
"platform_id": "123456789",
"settings": {
"publisher_own_domain": True,
"traffic_filters": [
{
"dimension": "sessionSource",
"match": "contains",
"values": ["aggregator.example.net"]
}
]
},
"start": "2026-11-09",
"end": "2026-11-15"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
platform_id: '123456789',
settings: {
publisher_own_domain: true,
traffic_filters: [
{
dimension: 'sessionSource',
match: 'contains',
values: ['aggregator.example.net']
}
]
},
start: '2026-11-09',
end: '2026-11-15'
})
};
fetch('https://api.tagdeliver.com/v1/integration/{id}/preview', 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.tagdeliver.com/v1/integration/{id}/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'platform_id' => '123456789',
'settings' => [
'publisher_own_domain' => true,
'traffic_filters' => [
[
'dimension' => 'sessionSource',
'match' => 'contains',
'values' => [
'aggregator.example.net'
]
]
]
],
'start' => '2026-11-09',
'end' => '2026-11-15'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tagdeliver.com/v1/integration/{id}/preview"
payload := strings.NewReader("{\n \"platform_id\": \"123456789\",\n \"settings\": {\n \"publisher_own_domain\": true,\n \"traffic_filters\": [\n {\n \"dimension\": \"sessionSource\",\n \"match\": \"contains\",\n \"values\": [\n \"aggregator.example.net\"\n ]\n }\n ]\n },\n \"start\": \"2026-11-09\",\n \"end\": \"2026-11-15\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.tagdeliver.com/v1/integration/{id}/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"platform_id\": \"123456789\",\n \"settings\": {\n \"publisher_own_domain\": true,\n \"traffic_filters\": [\n {\n \"dimension\": \"sessionSource\",\n \"match\": \"contains\",\n \"values\": [\n \"aggregator.example.net\"\n ]\n }\n ]\n },\n \"start\": \"2026-11-09\",\n \"end\": \"2026-11-15\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tagdeliver.com/v1/integration/{id}/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"platform_id\": \"123456789\",\n \"settings\": {\n \"publisher_own_domain\": true,\n \"traffic_filters\": [\n {\n \"dimension\": \"sessionSource\",\n \"match\": \"contains\",\n \"values\": [\n \"aggregator.example.net\"\n ]\n }\n ]\n },\n \"start\": \"2026-11-09\",\n \"end\": \"2026-11-15\"\n}"
response = http.request(request)
puts response.read_body{
"results": {
"columns": {
"before": "Before",
"after": "After",
"change": "Excluded"
},
"rows": [
{
"label": "Page views",
"before": 311908,
"after": 220085
}
],
"notes": [
"Only counting traffic on example.com (www. included)."
],
"list": {
"title": "Top matched excluded traffic (share of all page views):",
"empty": "No traffic in this period matches the filters you've set above.",
"total": 311908,
"items": [
{
"label": "aggregator.example.net · www.example.com",
"value": 83873
}
]
}
},
"success": true
}{
"success": false,
"message": "Form errors found: date_range: The data should match one item from enum"
}{
"success": false,
"message": "Token not found."
}{
"success": false,
"message": "User forbidden"
}{
"success": false,
"message": "Resource not found"
}{
"status": 500,
"message": "An error occurred [4f2k], please try again shortly or contact your account manager for further assistance."
}Authorizations
Path Parameters
Body
application/json
Was this page helpful?
⌘I
Preview integration settings
curl --request POST \
--url https://api.tagdeliver.com/v1/integration/{id}/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"platform_id": "123456789",
"settings": {
"publisher_own_domain": true,
"traffic_filters": [
{
"dimension": "sessionSource",
"match": "contains",
"values": [
"aggregator.example.net"
]
}
]
},
"start": "2026-11-09",
"end": "2026-11-15"
}
'import requests
url = "https://api.tagdeliver.com/v1/integration/{id}/preview"
payload = {
"platform_id": "123456789",
"settings": {
"publisher_own_domain": True,
"traffic_filters": [
{
"dimension": "sessionSource",
"match": "contains",
"values": ["aggregator.example.net"]
}
]
},
"start": "2026-11-09",
"end": "2026-11-15"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
platform_id: '123456789',
settings: {
publisher_own_domain: true,
traffic_filters: [
{
dimension: 'sessionSource',
match: 'contains',
values: ['aggregator.example.net']
}
]
},
start: '2026-11-09',
end: '2026-11-15'
})
};
fetch('https://api.tagdeliver.com/v1/integration/{id}/preview', 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.tagdeliver.com/v1/integration/{id}/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'platform_id' => '123456789',
'settings' => [
'publisher_own_domain' => true,
'traffic_filters' => [
[
'dimension' => 'sessionSource',
'match' => 'contains',
'values' => [
'aggregator.example.net'
]
]
]
],
'start' => '2026-11-09',
'end' => '2026-11-15'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tagdeliver.com/v1/integration/{id}/preview"
payload := strings.NewReader("{\n \"platform_id\": \"123456789\",\n \"settings\": {\n \"publisher_own_domain\": true,\n \"traffic_filters\": [\n {\n \"dimension\": \"sessionSource\",\n \"match\": \"contains\",\n \"values\": [\n \"aggregator.example.net\"\n ]\n }\n ]\n },\n \"start\": \"2026-11-09\",\n \"end\": \"2026-11-15\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.tagdeliver.com/v1/integration/{id}/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"platform_id\": \"123456789\",\n \"settings\": {\n \"publisher_own_domain\": true,\n \"traffic_filters\": [\n {\n \"dimension\": \"sessionSource\",\n \"match\": \"contains\",\n \"values\": [\n \"aggregator.example.net\"\n ]\n }\n ]\n },\n \"start\": \"2026-11-09\",\n \"end\": \"2026-11-15\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tagdeliver.com/v1/integration/{id}/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"platform_id\": \"123456789\",\n \"settings\": {\n \"publisher_own_domain\": true,\n \"traffic_filters\": [\n {\n \"dimension\": \"sessionSource\",\n \"match\": \"contains\",\n \"values\": [\n \"aggregator.example.net\"\n ]\n }\n ]\n },\n \"start\": \"2026-11-09\",\n \"end\": \"2026-11-15\"\n}"
response = http.request(request)
puts response.read_body{
"results": {
"columns": {
"before": "Before",
"after": "After",
"change": "Excluded"
},
"rows": [
{
"label": "Page views",
"before": 311908,
"after": 220085
}
],
"notes": [
"Only counting traffic on example.com (www. included)."
],
"list": {
"title": "Top matched excluded traffic (share of all page views):",
"empty": "No traffic in this period matches the filters you've set above.",
"total": 311908,
"items": [
{
"label": "aggregator.example.net · www.example.com",
"value": 83873
}
]
}
},
"success": true
}{
"success": false,
"message": "Form errors found: date_range: The data should match one item from enum"
}{
"success": false,
"message": "Token not found."
}{
"success": false,
"message": "User forbidden"
}{
"success": false,
"message": "Resource not found"
}{
"status": 500,
"message": "An error occurred [4f2k], please try again shortly or contact your account manager for further assistance."
}