Tracking Blocking
Block tracking scripts, web bugs, and information collectors from running during screenshot capture.Basic usage
bash
curl "https://api.domshot.com/shot?key=YOUR_API_KEY&url=https://example.com&blockTracking=true" \
--output screenshot.png
const params = new URLSearchParams({
key: 'YOUR_API_KEY',
url: 'https://example.com',
blockTracking: 'true'
});
await fetch(`https://api.domshot.com/shot?${params}`)
.then(res => res.blob())
.then(blob => fs.writeFile('screenshot.png', blob));
$params = [
'key' => 'YOUR_API_KEY',
'url' => 'https://example.com',
'blockTracking' => 'true'
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.domshot.com/shot?' . http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$result = curl_exec($ch);
file_put_contents('screenshot.png', $result);
curl_close($ch);
package main
import (
"net/http"
"net/url"
)
func main() {
params := url.Values{}
params.Set("key", "YOUR_API_KEY")
params.Set("url", "https://example.com")
params.Set("blockTracking", "true")
resp, _ := http.Get("https://api.domshot.com/shot?" + params.Encode())
defer resp.Body.Close()
// Save response to file
}
What gets blocked
| Type | Examples |
|---|---|
| Web bugs | Invisible tracking pixels |
| Tracking scripts | Analytics scripts |
| Information collectors | Fingerprinting scripts |
| Beacons | Telemetry and data collection |
Combining with other blocking
Tracking blocking works alongside ad and banner blocking:bash
curl "https://api.domshot.com/shot?key=YOUR_API_KEY&url=https://example.com&blockAds=true&blockTracking=true&blockBanners=true" \
--output screenshot.png
const params = new URLSearchParams({
key: 'YOUR_API_KEY',
url: 'https://example.com',
blockAds: 'true',
blockTracking: 'true',
blockBanners: 'true'
});
await fetch(`https://api.domshot.com/shot?${params}`)
.then(res => res.blob())
.then(blob => fs.writeFile('screenshot.png', blob));
$params = [
'key' => 'YOUR_API_KEY',
'url' => 'https://example.com',
'blockAds' => 'true',
'blockTracking' => 'true',
'blockBanners' => 'true'
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.domshot.com/shot?' . http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$result = curl_exec($ch);
file_put_contents('screenshot.png', $result);
curl_close($ch);
package main
import (
"net/http"
"net/url"
)
func main() {
params := url.Values{}
params.Set("key", "YOUR_API_KEY")
params.Set("url", "https://example.com")
params.Set("blockAds", "true")
params.Set("blockTracking", "true")
params.Set("blockBanners", "true")
resp, _ := http.Get("https://api.domshot.com/shot?" + params.Encode())
defer resp.Body.Close()
// Save response to file
}
- Ad Blocking - Block advertisements
- Cookie Banner Blocking - Block cookie consent banners
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
blockTracking | boolean | false | Enable tracking blocking |