Segment already routes your event data everywhere, so attaching a device signal to those events lets your downstream tools see which users are real and which are automated. Adding Prynt gives every Segment event a verifiable visitor ID and bot score.
This guide captures a Prynt ID in the browser, attaches it to your Segment calls, and verifies events server-side before anything acts on them. Because Segment already fans your events out to every tool, adding the device signal once means it reaches your warehouse, your CRM, and your fraud rules without a separate integration for each.
Load the agent alongside analytics.js
Initialize the agent once when the page loads, next to your Segment snippet.
import Prynt from '@prynt/js'
const agent = await Prynt.load({
apiKey: import.meta.env.VITE_PRYNT_KEY,
endpoint: 'https://api.pryntid.com'
})
Keep a single agent per page. It loads asynchronously and never blocks your analytics.
Attach the visitor ID to Segment calls
Call identify() at a decision point and pass the requestId as a trait or property so it rides through your pipeline.
const result = await agent.identify()
analytics.identify(userId, {
pryntId: result.requestId
})
analytics.track('Signup Submitted', {
pryntId: result.requestId
})
Now every destination sees the event ID. It is not trustworthy yet, but it is available where you need it.
Verify in a destination function or backend
A Segment destination function or your own backend verifies the event with the secret key. This is where the decision happens.
// destination function or server handler
const res = await fetch(
`https://api.pryntid.com/v1/events/${event.properties.pryntId}`,
{ headers: { Authorization: `Bearer ${process.env.PRYNT_SECRET}` } }
)
const data = await res.json()
if (data.bot.result === 'automated') {
suppressEvent() // do not forward to conversion tools
}
Verifying server-side also keeps bot traffic out of your analytics, so conversion numbers reflect real humans. The available fields, including proxy and ASN data, are in the bot detection guide.
Be deliberate about where you verify. A Segment destination function runs on Segment’s infrastructure and can hold your secret key securely, which is convenient for suppression logic. If you would rather keep the key in your own environment, verify in the backend that receives your server-side track calls instead. Either way, the browser only ever transports the event ID as a trait, and the decision that touches your funnel or your fraud queue lives somewhere a bot cannot reach.
Guard forms directly
For signup or lead forms, let Form Shield watch the element and add behavioral signals for scripted fills.
agent.protectForm(document.querySelector('#lead'), {
autoGuard: true,
expectedScripts: ['latin']
})
expectedScripts flags submissions in unexpected writing systems, a low-cost spam signal for Latin-script audiences. It adds a behavioral layer on top of the identity check your server performs.
Use the signal to clean your data and your funnel
With verified device signals flowing through Segment, you can do two things at once: block fraud at the point of action and stop counting bots as conversions. Route low-confidence events to review instead of your paid-ads pixels, and store the visitor ID against the user for later fraud rules.
Because Prynt is a managed cloud service, geolocation, VPN detection, and bot scoring arrive with no infrastructure to run, and the free tier covers early traffic while you validate the pipeline. This dual payoff, cleaner analytics and better fraud coverage from one integration, is what makes the Segment path worth the small amount of wiring. Add a key, attach the ID to your Segment calls, and verify server-side. See the pricing and free plan to start enriching your event data with trustworthy device signals.
Try it free
Prynt is device intelligence with a free tier — visitor IDs, bot & fraud Smart Signals, and behavioral biometrics, powered by a cross-site network. Start free.