Search K
Appearance
Install Leadbehavior on your website without Google Tag Manager. Use this method if you manage your scripts directly or use a tag management system other than GTM.
Prefer GTM?
If you use Google Tag Manager, the Community Template is the easiest way to install Leadbehavior.
The core Leadbehavior script sets up the window.leadbehavior object, loads the scoring library, and calls verify() with your lead configuration.
window.leadbehavior = window.leadbehavior || {
queue: [],
verify: function (options, callback) {
window.leadbehavior.queue.push([options, callback])
},
accountId: 'YOUR_ACCOUNT_ID',
}
if (!document.querySelector('[src*="static.leadbehavior.com/verify.js"]')) {
var s = document.createElement('script')
s.setAttribute('src', 'https://static.leadbehavior.com/verify.js')
s.setAttribute('crossorigin', true)
document.body.appendChild(s)
}
window.leadbehavior.verify(
{
'leadId': 'YOUR_LEAD_ID',
'orderId': 'YOUR_ORDER_ID', // A unique identifier for each conversion
},
function (score) {
console.log('leadbehavior score', score)
}
)Replace YOUR_ACCOUNT_ID, YOUR_LEAD_ID, and YOUR_ORDER_ID with your actual values.
Pre-filled Scripts
Each lead's detail page at app.leadbehavior.com/leads includes pre-filled script examples with your Account ID and Lead ID already populated. Click on a lead to view them.
window.leadbehavior — Creates a global object with a queue pattern. If verify() is called before the script loads, calls are queued and replayed once the library is ready.verify.js — The Leadbehavior scoring library loaded from static.leadbehavior.com. It collects a reCAPTCHA Enterprise token, browser fingerprint, click IDs (gclid, fbclid, dclid), and UTM parameters.verify(options, callback) — Sends the collected data to Leadbehavior for scoring. The callback receives the score result.Trigger Leadbehavior when a specific form is submitted:
var leadForm = document.getElementById('lead-form') // Replace with your form's ID
leadForm.addEventListener('submit', function () {
// Paste the bootstrap script here
})Trigger Leadbehavior when a button is clicked:
var leadButton = document.getElementById('lead-button') // Replace with your button's ID
leadButton.addEventListener('click', function () {
// Paste the bootstrap script here
})If you use GTM but want more control than the template provides, paste the bootstrap script into a Custom HTML tag:
<script>
(function () {
// Paste the bootstrap script here
})()
</script>Set an appropriate trigger (form submission, custom event, etc.) in GTM.
The orderId parameter is a unique identifier for each conversion event.
Important
The Order ID you pass to Leadbehavior must match the Order ID sent to Google Ads for the same conversion. This is how Google Ads matches the adjustment to the original conversion event.
The verify() callback function receives the scoring result:
window.leadbehavior.verify(
{
'leadId': 'YOUR_LEAD_ID',
'orderId': 'YOUR_ORDER_ID',
},
function (score) {
// score contains the result from Leadbehavior
console.log('leadbehavior score', score)
}
)You can use the callback for custom logic — such as logging, analytics, or conditional behavior based on the score.
Script not loading
https://static.leadbehavior.com/verify.js is not blocked by ad blockers or Content Security PolicyScore not returning in callback
Conversion adjustments not appearing in Google Ads