Signup Page Mode
Use this when the visitor fills out a form on a page you control, before your backend ever calls Revylta. The script captures device/behavior signals while the form is being filled out, and hands you a token to forward alongside the normal score request.
1. Install the script on the signup page
Mark your form with data-rv="signup". The script attaches a hidden revylta_token field to it automatically — you don't need to generate anything yourself.
<script src="https://edgefiles.ams3.cdn.digitaloceanspaces.com/revylta/revenueshield.js"
data-api-key="YOUR_BROWSER_KEY"
data-mode="signup"></script>
<form data-rv="signup">
<!-- Revylta automatically adds a hidden field: revylta_token -->
</form>2. Forward the token with your score request
When the form is submitted, send the hidden revylta_token field's value as revylta_token alongside the usual fields on /api/v1/score.
curl -X POST "https://revylta.com/api/v1/score" \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_SERVER_API_KEY" \
-d '{
"email": "jane.doe@example.com",
"ip": "203.0.113.42",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"source": "paid_search",
"subsource": "brand_campaign",
"revylta_token": "VALUE_FROM_SIGNUP_FORM"
}'const response = await fetch("https://revylta.com/api/v1/score", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-KEY": "YOUR_SERVER_API_KEY"
},
body: JSON.stringify({
"email": "jane.doe@example.com",
"ip": "203.0.113.42",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"source": "paid_search",
"subsource": "brand_campaign",
"revylta_token": "VALUE_FROM_SIGNUP_FORM"
})
});
const result = await response.json();
console.log(result);import requests
response = requests.post(
"https://revylta.com/api/v1/score",
headers={
"Content-Type": "application/json",
"X-API-KEY": "YOUR_SERVER_API_KEY"
},
json={
"email": "jane.doe@example.com",
"ip": "203.0.113.42",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"source": "paid_search",
"subsource": "brand_campaign",
"revylta_token": "VALUE_FROM_SIGNUP_FORM"
}
)
print(response.status_code)
print(response.json())require "net/http"
require "json"
require "uri"
uri = URI("https://revylta.com/api/v1/score")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
request = Net::HTTP::Post.new(uri)
request["Content-Type"] = "application/json"
request["X-API-KEY"] = "YOUR_SERVER_API_KEY"
request.body = JSON.generate({
"email": "jane.doe@example.com",
"ip": "203.0.113.42",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"source": "paid_search",
"subsource": "brand_campaign",
"revylta_token": "VALUE_FROM_SIGNUP_FORM"
})
response = http.request(request)
puts response.code
puts response.body<?php
$payload = [
"email" => "jane.doe@example.com",
"ip" => "203.0.113.42",
"user_agent" => "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"source" => "paid_search",
"subsource" => "brand_campaign",
"revylta_token" => "VALUE_FROM_SIGNUP_FORM"
];
$ch = curl_init("https://revylta.com/api/v1/score");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"X-API-KEY: YOUR_SERVER_API_KEY"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status . PHP_EOL;
echo $response . PHP_EOL;The score response is the same shape either way — see Score API.
Note: if the token can't be matched (expired, wrong browser key, or the form
was submitted from a different origin than it was rendered on), the score request still works —
it just proceeds without the staged telemetry.