Integrations
Segment and Amplitude integration
Keep the reports your team already uses. DataCops sends every session into Segment and Amplitude marked clean or bot, with the reason, so any chart, funnel or audience can show real visitors only.
What it is
DataCops checks every session on your own domain for bots, VPNs, proxies, Tor and data-center traffic. This integration sends that verdict into Segment and Amplitude as one event per session, so your existing analytics can separate real people from bots.Nothing in your current Segment tracking plan or Amplitude project changes. DataCops only adds one event, next to the events you already send.
How it works, step by step
A visitor lands on your site
The DataCops script runs on your own subdomain and opens a session. It records the landing page, the referrer and where the visit came from.
The session gets a verdict
DataCops runs its bot checks in the browser and its IP checks on the server. The result is stored on the session: bot or not, the reasons, and one true/false for VPN, proxy, Tor and data center.
Every two minutes, new sessions are collected
A background job looks for sessions that started since the last successful run for your site. It takes up to 500 sessions per run, oldest first, so a busy site catches up over the next runs instead of skipping anything.
Each session is sent as one event
Each session becomes one
DataCops Session Scoredevent. Segment gets it through its HTTP tracking API. Amplitude gets it through its HTTP API, in the region your project lives in.Every send is logged
Each send is written to the DataCops audit log as sent, failed or skipped. If one session fails, the rest of the batch still goes out.
The data is the same session data you can pull yourself from the export API. This integration simply pushes it to you, so nobody has to run a script.
What arrives
Every session arrives as one event named DataCops Session Scored. Clean and flagged sessions are both sent, so your totals always add up. The event carries these properties:
| Property | What it means |
|---|---|
is_clean | true when the session is not a bot, VPN, proxy, Tor or data-center visit. The one field to filter on. |
is_bot | true when the session was flagged as automated. |
bot_reasons | The signals that fired, for example headless browser detected. |
is_vpn, is_proxy, is_tor, is_datacenter | The network checks, one true/false each. |
country, city | Where the visit came from. |
referrer, landing_url | Where the visitor arrived from and the first page they saw. |
session_id | The DataCops session. Also used as the anonymous ID when there is no user ID. |
source | Always datacops, so you can tell these events apart. |
Sessions are sent every two minutes through the official Segment and Amplitude APIs. For Amplitude, DataCops sends to the EU or US data center, matching your project.
One small difference between the two tools: in Segment, country and city sit inside the event properties. In Amplitude they go into Amplitude's own country and city fields, so they work with its built-in location filters.
Example events
This is the shape of one session as Segment receives it. The values are an example.
{
"anonymousId": "<session id>",
"event": "DataCops Session Scored",
"timestamp": "2026-10-01T09:14:02.000Z",
"properties": {
"session_id": "<session id>",
"is_clean": false,
"is_bot": true,
"is_vpn": false,
"is_proxy": false,
"is_tor": false,
"is_datacenter": true,
"bot_reasons": "headless browser detected",
"country": "US",
"city": "Ashburn",
"referrer": "https://example-referrer.com/",
"landing_url": "https://yourshop.com/landing",
"source": "datacops"
},
"context": { "library": { "name": "datacops", "version": "1.0.0" } }
} The same session in Amplitude looks like this:
{
"device_id": "<session id>",
"event_type": "DataCops Session Scored",
"time": 1790846042000,
"event_properties": {
"session_id": "<session id>",
"is_clean": false,
"is_bot": true,
"is_datacenter": true,
"bot_reasons": "headless browser detected",
"source": "datacops"
},
"country": "US",
"city": "Ashburn"
} The Amplitude example is shortened. It carries the same VPN, proxy, Tor, referrer and landing page properties as the Segment event.
Using it in your reports
- Real visitors only: filter any chart or audience on
is_clean = true. - How much traffic is fake: compare
is_clean = trueandfalseby channel, country or landing page. - Which sources send bots: group flagged sessions by
referrerand readbot_reasons. - Clean funnels: join the verdict to your existing events through the same user ID, and exclude flagged users from funnel and retention charts.
Identity and consent
When a visitor has consented and has a user ID, the event is sent with that user ID, so it lines up with your other events for the same person. Otherwise it is sent with the DataCops session ID as the anonymous ID.
| Tool | With a user ID | Without a user ID |
|---|---|---|
| Segment | userId | anonymousId = DataCops session ID |
| Amplitude | user_id (5 characters or more) | device_id = DataCops session ID |
Amplitude rejects IDs shorter than 5 characters, so a very short user ID is sent as a device ID instead. The session_id property is always included, so you can still join on it.
DataCops follows your consent setup. A visitor who declines is only counted as an anonymous session, with no user ID and no device fingerprint.
Setup
The DataCops team sets this up for you. There is nothing to build on your side.
Install DataCops
Add the DataCops script on your own subdomain, as in getting started, so sessions are being scored.
Share your keys
For Segment, a write key from the source you want the events in. For Amplitude, the project API key and whether the project is in the EU or US.
DataCops connects and tests
We connect the keys, then check with you that the first
DataCops Session Scoredevents arrive where you expect them.Check the connection event in Amplitude
When an Amplitude key is saved, DataCops sends one test event named
DataCops Connectedto check the key and region. If the key or region is wrong, the connection is refused, so a saved Amplitude connection is a working one.
How it fits with DataCops
This integration is for reporting. It does not send conversions to ad platforms. If you also want clean conversions in your ad accounts, that is a separate switch:
- Conversion delivery sends purchases and leads to Meta, Google Ads, TikTok, LinkedIn, Microsoft Ads, Reddit, Pinterest and X.
- Real people only stops bot conversions from reaching an ad platform. It is set per platform and is off by default.
- IP intelligence explains the VPN, proxy, Tor and data-center checks behind each true/false field.
You can run all of these at once. Segment and Amplitude get the verdict for every session, while your ad platforms get only the conversions you choose to send.
Good to know
- Sending starts with sessions from the last 15 minutes before the first run. Older sessions can be pulled through the export API.
- Segment accepts events even if a write key is wrong, so we always confirm the first events arrive before calling setup done.
- Every send is logged on our side, so a missing event can be traced.