Skip to main content
How to use Spider AF for Web

This page explains how to connect Spider AF

Ronald Ng avatar
Written by Ronald Ng
Updated yesterday

Getting started

Follow these steps to use Spider AF

Setup

Spider AF retrieves signals from the traffic on web properties that have the Spider AF Tag installed. Using these signals, Spider AF categorizes traffic into valid and invalid categories, provides more visibility into the traffic that is coming onto the web property, and allows the user to configure Spider AF to block invalid traffic from coming back.

Step 1a. Set up the tag

The Spider AF tags that you use are for your account only. After you sign up, you can access your tags. If you ever need to manage or find your tag again, it can be found within the dashboard.

You can simply copy the tag from the tracker page and paste the code on your website's header.

Sample tag 1: All pages

<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 ID##', {
// optional parameters:
// segment: '##segment##'
});
</script>

Step 1b. GTM set up

If there is some constraints where you cannot install the tag directly into the header of a website, you can add the Spider AF tags for all pages and conversion pages using Google Tag Manager

See this pages to set up Spider AF Conversion tags with Google Tag Manager:

Step 2. Connect to the Google Ads API

To complete the setup, the user must Connect an Ad Account. In the dashboard, go to Configurations > Select Google Ads > Connect an ad account

Select your account and log in if needed. Click Allow.

Click Proceed to complete the connection.

Select your Google Ads Account you'd like to integrate and click on 'Proceed'.

Important note: enabling the tracking template it’ll help Spider AF track your campaign sources better, so you get the most accurate analysis and reports.

If you'd like to know more about it, click here.

If you run ads on more than one ad account, you add them from the dashboard in configurations > Google Ads > Add a new account to add additional accounts.

Step 3. Configure blocking

All blocking categories in Spider AF are enabled by default. But to disable/enable blocking in the dashboard, go to Protection > Blocking Settings.

Spider AF recommends keeping all the fraud categories enabled for blocking, but there may be situations in which a user may not want to block a specific category of invalid traffic. Spider AF is flexible in its operations and allows the user to declare which kind of traffic they wish to block or not block.

Here, you can adjust the enablement of the specific categories.​

  • Crawlers

  • Data Centers

  • Invalid User Agents

  • Bots

  • Invalid User Agents

  • Fraquency Cap

  • Suspicious IPs

  • Domain Spoofing

  • and more...

Optional setup: Conversions

Spider AF can help measure conversions to identify invalid conversions, or limit actions to not impact converting IPs/users.


Sample tag 2: Conversion pages

<script>
var sptrk=function(){var o="https://sp-trk.com/",w="__spd",e=(new Date).getTime();function c(n){var t=document.createElement("script");t.async=!0,t.src=n,document.head.appendChild(t)}window[w]||(window[w]={}),window[w].d||(window[w].d=[]),c(o+"u");var s=/^([a-z0-9]{8})-([a-z0-9]{2})$/,u=!1;return function(){var n=arguments;if(window[w].d.push(n),"config"==n[0]&&!u&&!window[w].a){u=!0;var t=n[1],a=t.match(s),i=a[1],d=a[2];if(!i||!d)throw"invalid id: "+t;var r=Math.random().toString(36).substring(2,15);c(o+"t/"+i+"?"+("a="+e+"&o="+r))}}}();

sptrk('config', '##TrackerID##', {
xuid: '##xuid##',
xsid: '##xsid##'
});

sptrk('event', 'conversion');
</script>

For the conversion tag, you must dynamically fill in these values, additional support may be provided if there are any questions related to this setup:

##xuid##: ID for each user
##xsid##: ID for each conversion

Did this answer your question?