Get Veriform running on your site in under 5 minutes.
Prerequisites #
Before you start, you’ll need:
- ✅ A Veriform account — Sign up here
- ✅ An API key — Get one from your Dashboard
- ✅ A web form on your site to capture leads
Test vs Production Keys
test_keys are for development and testing. Certificates are free but expire after 7 days.prod_keys are for production. Certificates are stored permanently and count against your plan.
1) Try the Demo #
Before integrating, see Veriform in action:
- Visit example.veriform.co
- Fill out the demo form
- Submit and view your consent certificate
Or use the Test Suite to test with your own API key.
2) Add the SDK to Your Page #
Add the SDK script tag to your HTML page, just before the closing </body> tag. Replace YOUR_API_KEY with your actual API key:
<!-- Veriform SDK -->
<script
src="https://cert.veriform.co/sdk.min.js"
data-key="YOUR_API_KEY"
defer
></script>
The SDK will automatically:
- Validate your API key with the server
- Generate a unique certificate ID
- Start recording the session using
- Stream events to the Veriform server via WebSocket
- Populate any
#recCertUrlhidden field with the certificate URL
Important: Replace YOUR_API_KEY with your actual test or production key from the Dashboard.
3) Add the Hidden Field #
Add a hidden input with id="recCertUrl" to your form. The SDK will automatically populate it with the certificate URL:
<form id="lead-form">
<input type="text" name="firstName" placeholder="First Name" required>
<input type="text" name="lastName" placeholder="Last Name" required>
<input type="email" name="email" placeholder="Email" required>
<input type="tel" name="phone" placeholder="Phone" required>
<!-- TCPA consent checkbox -->
<label>
<input type="checkbox" name="consent" required>
I agree to receive calls and texts at the number provided...
</label>
<!-- Veriform certificate URL (auto-populated by SDK) -->
<input type="hidden" id="recCertUrl" name="recCertUrl">
<button type="submit">Submit</button>
</form>
4) Handle Form Submission #
Before redirecting or submitting, call veriformSave() to ensure the recording is saved:
const form = document.getElementById('lead-form');
form.addEventListener('submit', async (e) => {
e.preventDefault();
// Save the recording to generate the certificate
if (window.veriformSave) {
try {
await window.veriformSave();
console.log('Recording saved successfully');
} catch (err) {
console.error('Error saving recording:', err);
// Continue anyway - the recording may still be saved on disconnect
}
}
// Get the certificate URL from the hidden field
const certUrl = document.getElementById('recCertUrl').value;
// Option 1: Send to your backend with the certificate URL
const formData = new FormData(form);
await fetch('/api/leads', {
method: 'POST',
body: formData
});
// Option 2: Redirect to the certificate page
window.location.href = certUrl;
});
Why
await veriformSave()?The SDK streams events in real-time, but calling
veriformSave()ensures the final recording is persisted to storage before you redirect the user. Without it, the last few seconds of the session might be lost.
5) Store the Certificate URL #
The recCertUrl field contains the full certificate URL, e.g.:
https://cert.veriform.co/view/pub_abc123xyz...
Store this URL with your lead record. You’ll need it to prove consent later.
6) View the Certificate #
Each certificate has three tabs:
Certificate Tab #
Shows all metadata captured:
- When: Session start time, duration
- Where: URL visited
- Who: IP address, reverse DNS, geolocation (city, region, country, coordinates), timezone, ISP, organization, AS info, proxy/VPN/datacenter detection, browser
Event Log Tab #
Timeline of all user interactions:
- Mouse clicks and movements
- Keyboard inputs (with values)
- Scrolls and viewport changes
- DOM mutations
Session Replay Tab #
Full video playback of the user’s session.
SDK Reference #
Script Attributes #
| Attribute | Description |
|---|---|
src |
Required. The SDK URL: https://cert.veriform.co/sdk.min.js |
data-key |
Required. Your API key (test_xxx or prod_xxx) |
defer |
Recommended. Loads the script without blocking page render |
Global Functions #
| Function | Description |
|---|---|
window.veriformSave() |
Returns a Promise that resolves when the recording is saved. Call this before redirect. |
window.veriformReady() |
Returns true if the SDK is connected and recording |
window.veriformCertUrl() |
Returns the certificate URL for the current session |
window.veriformRecId() |
Returns the unique recording ID |
window.veriformApiKeyValid() |
Returns true if the API key is valid, false if invalid, null if still validating |
Auto-populated Elements #
| Element ID | Value |
|---|---|
#recCertUrl |
The full certificate URL (e.g., https://cert.veriform.co/view/pub_abc123...) |
Troubleshooting #
SDK Not Loading #
- Check the browser console for errors
- Verify the API key is correct
- Ensure the script is placed before
</body>
Certificate URL is Empty #
- The SDK needs a few seconds to connect
- Check if
veriformReady()returnstrue - Use the Test Suite to debug
API Key Invalid #
- Keys are environment-specific:
test_for development,prod_for production - Check the key is active in your Dashboard
- Keys may be rate-limited or suspended
Next Steps #
- Test with the Test Suite — Debug your integration in real-time
- View the SDK Reference for advanced configuration
- See example integrations for common use cases
- Review billing for production usage