Introduction
To proceed with the trial, the following setup steps are required:
Register a user account on Spider AF.
Install the Spider AF JS tag in the following locations:
All pages of your website
All form submission pages (conversion points/thank-you pages)
Details for each section are provided below for reference.
If you need assistance with the setup, we can guide you online. Please feel free to reach out! 🙇♀️
1. Register a User Account on Spider AF
Create an account on Spider AF.
Please enter your email address on this page. After submitting your email, you will receive a verification email. Follow the instructions in the email to complete your registration.
2. After completing the registration, you will be redirected to the following screen. Please select "Fake Lead Protection."
3. Once you've completed the previous step, you will be redirected to the next screen. On this screen, select the system on which your site's forms are built.
If your forms are not created using Webflow, choose "Manual integration."
2. Install the Spider AF JS Tag in the Following Locations
Install the Spider AF JS Tag on all pages of the website
After selecting either "Manual Integration" or "Integration with Webflow" in the previous step, you will be directed to the next page, where the Spider AF tag for all site pages will be displayed. Click "Copy" to copy the tag and add it to the
<head>
section of every page.
The template for the Spider AF tag for all pages of the site is as follows:
The part of the tag that includes "<tracker>-01" will have a different string for each account. Please copy it from the page above and use the appropriate string for your account.
<script>
var sptrk=function(){var o="https://sp-trk.com/",t="__spd",e=(new Date).getTime();window[t]||(window[t]={init:!1});var c=window[t];c.d||(c.d=[]);var s=c.d;function v(t){var i=document.createElement("script");i.async=!0,i.src=t,document.head.appendChild(i)}c.init||v(o+"u");var u=/^([a-z0-9]{8})-([a-z0-9]{2})$/;return function(){var t=arguments;if(s.push(t),"config"==t[0]&&!c.init&&!c.a)
{c.init=!0;var i=t[1],n=i.match(u),a=n[1],r=n[2];if(!a||!r)throw"invalid id:
"+i;var
d=Math.random().toString(36).substring(2,15);v(o+"t/"+a+"?"+("a="+e+"&o="+d))}}}();
sptrk('config', '<tracker>-01', {
// Use this variable if you want to filter reports by product.
// campaign: '##campaign_id##'
});
</script>
2. As shown at the bottom of the page (in the attached image), if your system assigns unique IDs or numbers to users or leads (conversions), you can enhance the accuracy of your analysis by modifying the tag as indicated on the screen.
If possible, please add the additional details to the tag and then install it. This will enable a more detailed analysis and improve the overall accuracy.
⚠️⚠️ The following changes are required ⚠️⚠️
Replace the '<user id>' part with the variable for the unique ID or number assigned to each user.
Replace the '<session id>' part with the variable for the unique ID or number assigned to each lead (conversion).
This is the tag template for Spider AF (for obtaining User ID / Lead ID) on all pages of the site.
The string "<tracker>-01" in the tag will differ for each account, so please copy it from the Spider AF site page and use it.
As mentioned, you can replace '<user id>' with the variable for the unique ID or number assigned to each user and replace '<session id>' with the variable for the unique ID or number assigned to each lead (conversion).
<script>
var sptrk=function(){var o="https://sp-trk.com/",t="__spd",e=(new Date).getTime();window[t]||(window[t]={init:!1});var c=window[t];c.d||(c.d=[]);var s=c.d;function v(t){var i=document.createElement("script");i.async=!0,i.src=t,document.head.appendChild(i)}c.init||v(o+"u");var u=/^([a-z0-9]{8})-([a-z0-9]{2})$/;return function(){var t=arguments;if(s.push(t),"config"==t[0]&&!c.init&&!c.a)
{c.init=!0;var i=t[1],n=i.match(u),a=n[1],r=n[2];if(!a||!r)throw"invalid id:
"+i;var
d=Math.random().toString(36).substring(2,15);v(o+"t/"+a+"?"+("a="+e+"&o="+d))}}}();
sptrk('config', '<tracker>-01', {xuid: '<user id>', xsid:
'<session id>'});
</script>
Install the Spider AF JS Tag on All Form Submission Pages (Conversion Points / Thank-You Pages)
Install the Spider AF JS tag on all form submission pages, including conversion points and thank-you pages. This will ensure that tracking is active at the points where conversions are completed.
After completing the previous step, you will be directed to the next screen, where the tag for all form submission pages (conversion points/thank-you pages) will be displayed.
2. Before copying the tag, please scroll down to the bottom of the page. There, you'll find the following instructions.
By updating the relevant parts of the tag as shown below, you can enable more detailed analysis and improve accuracy. If possible, please make these changes before installing the tag.
"email": Replace with the email address variable
"name": Replace with the name variable
"phone": Replace with the phone number variable
This is the tag template for Spider AF on form submission pages (conversion points/thank-you pages).
As mentioned, please replace the following parts with the relevant variables before installing the tag:
"email": Replace with the email address variable
"name": Replace with the name variable
"phone": Replace with the phone number variable
<script>
var timeoutMs = 1500;
function addTimeoutFailsafe(form) {
return setTimeout(function(){
form.click();
}, timeoutMs);
}
function getFormValues(form, targetKeys) {
var obj = {};
Object.keys(targetKeys).forEach((k) => {
var element = form.elements[targetKeys[k]];
obj[k] = element ? element.value : null
});
return obj;
}
function closestForm(element) {
while (element && element.tagName !== "FORM") {
element = element.parentElement;
}
return element;
}
var hasExecutedFormSubmission = [];
function processForm(e, targetKeys) {
var form = closestForm(e.target);
if (hasExecutedFormSubmission[form]) {
return true;
}
if (typeof sptrk === "function") {
if (e.preventDefault) { e.preventDefault(); }
hasExecutedFormSubmission[form] = true;
var timeoutId = addTimeoutFailsafe(e.target);
var formValues = getFormValues(form, targetKeys)
sptrk("validate", "submission", formValues, function(result) {
clearTimeout(timeoutId);
e.target.click();
});
}
}
document.addEventListener("DOMContentLoaded", function() {
document.querySelectorAll("form input[type=submit]").forEach(element => {
element.addEventListener("click", function(event) {
processForm(event, {
email: "email",
name: “name”,
phone: “phone”
});
});
});
});
</script>
3. Finally, click the green button "Check Integration" at the bottom right of the page. This will automatically verify if the tag is properly installed and firing. Once the verification is complete, the Spider AF trial detection will start, and you can begin viewing the data.