Replace the workspace's web analytics settings
curl --request POST \
--url https://{notifuseDomain}/api/workspaces.setWebAnalyticsSettings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspace_id": "<string>",
"settings": {
"enabled": true,
"allowed_domains": [
"<string>"
],
"bounce_threshold_seconds": 123,
"filters": [
{
"id": "<string>",
"name": "<string>",
"priority": 500,
"conditions": [
{
"field": "<string>",
"value": "<string>"
}
],
"operations": [
{
"dimension": "<string>",
"value": "<string>"
}
],
"enabled": true,
"order": 123,
"tags": [
"<string>"
],
"version": "<string>"
}
],
"custom_dimension_labels": {},
"identify_from_email_links": true,
"geo_enabled": true,
"geo_store_city": true,
"geo_store_region": true,
"geo_coordinates_precision": 1
}
}
'import requests
url = "https://{notifuseDomain}/api/workspaces.setWebAnalyticsSettings"
payload = {
"workspace_id": "<string>",
"settings": {
"enabled": True,
"allowed_domains": ["<string>"],
"bounce_threshold_seconds": 123,
"filters": [
{
"id": "<string>",
"name": "<string>",
"priority": 500,
"conditions": [
{
"field": "<string>",
"value": "<string>"
}
],
"operations": [
{
"dimension": "<string>",
"value": "<string>"
}
],
"enabled": True,
"order": 123,
"tags": ["<string>"],
"version": "<string>"
}
],
"custom_dimension_labels": {},
"identify_from_email_links": True,
"geo_enabled": True,
"geo_store_city": True,
"geo_store_region": True,
"geo_coordinates_precision": 1
}
}
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({
workspace_id: '<string>',
settings: {
enabled: true,
allowed_domains: ['<string>'],
bounce_threshold_seconds: 123,
filters: [
{
id: '<string>',
name: '<string>',
priority: 500,
conditions: [{field: '<string>', value: '<string>'}],
operations: [{dimension: '<string>', value: '<string>'}],
enabled: true,
order: 123,
tags: ['<string>'],
version: '<string>'
}
],
custom_dimension_labels: {},
identify_from_email_links: true,
geo_enabled: true,
geo_store_city: true,
geo_store_region: true,
geo_coordinates_precision: 1
}
})
};
fetch('https://{notifuseDomain}/api/workspaces.setWebAnalyticsSettings', 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://{notifuseDomain}/api/workspaces.setWebAnalyticsSettings",
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([
'workspace_id' => '<string>',
'settings' => [
'enabled' => true,
'allowed_domains' => [
'<string>'
],
'bounce_threshold_seconds' => 123,
'filters' => [
[
'id' => '<string>',
'name' => '<string>',
'priority' => 500,
'conditions' => [
[
'field' => '<string>',
'value' => '<string>'
]
],
'operations' => [
[
'dimension' => '<string>',
'value' => '<string>'
]
],
'enabled' => true,
'order' => 123,
'tags' => [
'<string>'
],
'version' => '<string>'
]
],
'custom_dimension_labels' => [
],
'identify_from_email_links' => true,
'geo_enabled' => true,
'geo_store_city' => true,
'geo_store_region' => true,
'geo_coordinates_precision' => 1
]
]),
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://{notifuseDomain}/api/workspaces.setWebAnalyticsSettings"
payload := strings.NewReader("{\n \"workspace_id\": \"<string>\",\n \"settings\": {\n \"enabled\": true,\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"bounce_threshold_seconds\": 123,\n \"filters\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"priority\": 500,\n \"conditions\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"operations\": [\n {\n \"dimension\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"enabled\": true,\n \"order\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"version\": \"<string>\"\n }\n ],\n \"custom_dimension_labels\": {},\n \"identify_from_email_links\": true,\n \"geo_enabled\": true,\n \"geo_store_city\": true,\n \"geo_store_region\": true,\n \"geo_coordinates_precision\": 1\n }\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://{notifuseDomain}/api/workspaces.setWebAnalyticsSettings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspace_id\": \"<string>\",\n \"settings\": {\n \"enabled\": true,\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"bounce_threshold_seconds\": 123,\n \"filters\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"priority\": 500,\n \"conditions\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"operations\": [\n {\n \"dimension\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"enabled\": true,\n \"order\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"version\": \"<string>\"\n }\n ],\n \"custom_dimension_labels\": {},\n \"identify_from_email_links\": true,\n \"geo_enabled\": true,\n \"geo_store_city\": true,\n \"geo_store_region\": true,\n \"geo_coordinates_precision\": 1\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{notifuseDomain}/api/workspaces.setWebAnalyticsSettings")
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 \"workspace_id\": \"<string>\",\n \"settings\": {\n \"enabled\": true,\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"bounce_threshold_seconds\": 123,\n \"filters\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"priority\": 500,\n \"conditions\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"operations\": [\n {\n \"dimension\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"enabled\": true,\n \"order\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"version\": \"<string>\"\n }\n ],\n \"custom_dimension_labels\": {},\n \"identify_from_email_links\": true,\n \"geo_enabled\": true,\n \"geo_store_city\": true,\n \"geo_store_region\": true,\n \"geo_coordinates_precision\": 1\n }\n}"
response = http.request(request)
puts response.read_bodyWeb Analytics
Replace the workspace's web analytics settings
Gated by the web_analytics write permission (like blog settings, members manage the feature without workspace write access). The attribution filters version is recomputed server-side. Passing null settings clears the configuration.
Writing an identified visitor’s goals and navigation to their contact timeline is not configured here and has no setting: calling identify() with an HMAC is the opt-in, because minting that credential requires the workspace secret.
POST
/
api
/
workspaces.setWebAnalyticsSettings
Replace the workspace's web analytics settings
curl --request POST \
--url https://{notifuseDomain}/api/workspaces.setWebAnalyticsSettings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspace_id": "<string>",
"settings": {
"enabled": true,
"allowed_domains": [
"<string>"
],
"bounce_threshold_seconds": 123,
"filters": [
{
"id": "<string>",
"name": "<string>",
"priority": 500,
"conditions": [
{
"field": "<string>",
"value": "<string>"
}
],
"operations": [
{
"dimension": "<string>",
"value": "<string>"
}
],
"enabled": true,
"order": 123,
"tags": [
"<string>"
],
"version": "<string>"
}
],
"custom_dimension_labels": {},
"identify_from_email_links": true,
"geo_enabled": true,
"geo_store_city": true,
"geo_store_region": true,
"geo_coordinates_precision": 1
}
}
'import requests
url = "https://{notifuseDomain}/api/workspaces.setWebAnalyticsSettings"
payload = {
"workspace_id": "<string>",
"settings": {
"enabled": True,
"allowed_domains": ["<string>"],
"bounce_threshold_seconds": 123,
"filters": [
{
"id": "<string>",
"name": "<string>",
"priority": 500,
"conditions": [
{
"field": "<string>",
"value": "<string>"
}
],
"operations": [
{
"dimension": "<string>",
"value": "<string>"
}
],
"enabled": True,
"order": 123,
"tags": ["<string>"],
"version": "<string>"
}
],
"custom_dimension_labels": {},
"identify_from_email_links": True,
"geo_enabled": True,
"geo_store_city": True,
"geo_store_region": True,
"geo_coordinates_precision": 1
}
}
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({
workspace_id: '<string>',
settings: {
enabled: true,
allowed_domains: ['<string>'],
bounce_threshold_seconds: 123,
filters: [
{
id: '<string>',
name: '<string>',
priority: 500,
conditions: [{field: '<string>', value: '<string>'}],
operations: [{dimension: '<string>', value: '<string>'}],
enabled: true,
order: 123,
tags: ['<string>'],
version: '<string>'
}
],
custom_dimension_labels: {},
identify_from_email_links: true,
geo_enabled: true,
geo_store_city: true,
geo_store_region: true,
geo_coordinates_precision: 1
}
})
};
fetch('https://{notifuseDomain}/api/workspaces.setWebAnalyticsSettings', 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://{notifuseDomain}/api/workspaces.setWebAnalyticsSettings",
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([
'workspace_id' => '<string>',
'settings' => [
'enabled' => true,
'allowed_domains' => [
'<string>'
],
'bounce_threshold_seconds' => 123,
'filters' => [
[
'id' => '<string>',
'name' => '<string>',
'priority' => 500,
'conditions' => [
[
'field' => '<string>',
'value' => '<string>'
]
],
'operations' => [
[
'dimension' => '<string>',
'value' => '<string>'
]
],
'enabled' => true,
'order' => 123,
'tags' => [
'<string>'
],
'version' => '<string>'
]
],
'custom_dimension_labels' => [
],
'identify_from_email_links' => true,
'geo_enabled' => true,
'geo_store_city' => true,
'geo_store_region' => true,
'geo_coordinates_precision' => 1
]
]),
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://{notifuseDomain}/api/workspaces.setWebAnalyticsSettings"
payload := strings.NewReader("{\n \"workspace_id\": \"<string>\",\n \"settings\": {\n \"enabled\": true,\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"bounce_threshold_seconds\": 123,\n \"filters\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"priority\": 500,\n \"conditions\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"operations\": [\n {\n \"dimension\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"enabled\": true,\n \"order\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"version\": \"<string>\"\n }\n ],\n \"custom_dimension_labels\": {},\n \"identify_from_email_links\": true,\n \"geo_enabled\": true,\n \"geo_store_city\": true,\n \"geo_store_region\": true,\n \"geo_coordinates_precision\": 1\n }\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://{notifuseDomain}/api/workspaces.setWebAnalyticsSettings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspace_id\": \"<string>\",\n \"settings\": {\n \"enabled\": true,\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"bounce_threshold_seconds\": 123,\n \"filters\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"priority\": 500,\n \"conditions\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"operations\": [\n {\n \"dimension\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"enabled\": true,\n \"order\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"version\": \"<string>\"\n }\n ],\n \"custom_dimension_labels\": {},\n \"identify_from_email_links\": true,\n \"geo_enabled\": true,\n \"geo_store_city\": true,\n \"geo_store_region\": true,\n \"geo_coordinates_precision\": 1\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{notifuseDomain}/api/workspaces.setWebAnalyticsSettings")
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 \"workspace_id\": \"<string>\",\n \"settings\": {\n \"enabled\": true,\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"bounce_threshold_seconds\": 123,\n \"filters\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"priority\": 500,\n \"conditions\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"operations\": [\n {\n \"dimension\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"enabled\": true,\n \"order\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"version\": \"<string>\"\n }\n ],\n \"custom_dimension_labels\": {},\n \"identify_from_email_links\": true,\n \"geo_enabled\": true,\n \"geo_store_city\": true,\n \"geo_store_region\": true,\n \"geo_coordinates_precision\": 1\n }\n}"
response = http.request(request)
puts response.read_body⌘I
