curl --request POST \
--url 'https://demo.notifuse.com/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": 123,
"order": 123,
"tags": [
"<string>"
],
"conditions": [
{
"field": "<string>",
"operator": "equals",
"value": "<string>"
}
],
"operations": [
{
"dimension": "<string>",
"action": "set_value",
"value": "<string>"
}
],
"enabled": true,
"version": "<string>"
}
],
"custom_dimension_labels": {
"key": "<string>"
},
"identify_from_email_links": true,
"geo_enabled": true,
"geo_store_city": true,
"geo_store_region": true,
"geo_coordinates_precision": 123
}
}'
const response = await fetch('https://demo.notifuse.com/api/workspaces.setWebAnalyticsSettings', {
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": 123,
"order": 123,
"tags": [
"<string>"
],
"conditions": [
{
"field": "<string>",
"operator": "equals",
"value": "<string>"
}
],
"operations": [
{
"dimension": "<string>",
"action": "set_value",
"value": "<string>"
}
],
"enabled": true,
"version": "<string>"
}
],
"custom_dimension_labels": {
"key": "<string>"
},
"identify_from_email_links": true,
"geo_enabled": true,
"geo_store_city": true,
"geo_store_region": true,
"geo_coordinates_precision": 123
}
})
});
const data = await response.json();
console.log(data);
import requests
url = "https://demo.notifuse.com/api/workspaces.setWebAnalyticsSettings"
payload = {
"workspace_id": "<string>",
"settings": {
"enabled": True,
"allowed_domains": [
"<string>"
],
"bounce_threshold_seconds": 123,
"filters": [
{
"id": "<string>",
"name": "<string>",
"priority": 123,
"order": 123,
"tags": [
"<string>"
],
"conditions": [
{
"field": "<string>",
"operator": "equals",
"value": "<string>"
}
],
"operations": [
{
"dimension": "<string>",
"action": "set_value",
"value": "<string>"
}
],
"enabled": True,
"version": "<string>"
}
],
"custom_dimension_labels": {
"key": "<string>"
},
"identify_from_email_links": True,
"geo_enabled": True,
"geo_store_city": True,
"geo_store_region": True,
"geo_coordinates_precision": 123
}
}
headers = {"Authorization": "Bearer <token>"}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader(`{
"workspace_id": "<string>",
"settings": {
"enabled": true,
"allowed_domains": [
"<string>"
],
"bounce_threshold_seconds": 123,
"filters": [
{
"id": "<string>",
"name": "<string>",
"priority": 123,
"order": 123,
"tags": [
"<string>"
],
"conditions": [
{
"field": "<string>",
"operator": "equals",
"value": "<string>"
}
],
"operations": [
{
"dimension": "<string>",
"action": "set_value",
"value": "<string>"
}
],
"enabled": true,
"version": "<string>"
}
],
"custom_dimension_labels": {
"key": "<string>"
},
"identify_from_email_links": true,
"geo_enabled": true,
"geo_store_city": true,
"geo_store_region": true,
"geo_coordinates_precision": 123
}
}`)
req, _ := http.NewRequest("POST", "https://demo.notifuse.com/api/workspaces.setWebAnalyticsSettings", 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))
}