Adline Tracking Script Documentation (Events & Conversion Tracking)

This documentation will guide you through the installation and functionality of the Adline Tracking Script

The Adline Tracking Script is a JavaScript (JS) script designed to be seamlessly integrated into your website's code. This script plays a crucial role in tracking various user interactions and events on your website to sync data to Google and Facebook's conversion APIs.

To begin tracking events on your website, you need to install the Adline Tracking Script. Simply copy and paste the custom code snippet into the <head> element of your web pages. You can find your specific tracking script with your own ID here. The Tracking Script looks like this:

Example:

<script>
            function loadScript(c,b){var a=document.createElement("script");a.type="text/javascript";a.readyState?a.onreadystatechange=function(){if("loaded"==a.readyState||"complete"==a.readyState)a.onreadystatechange=null,b()}:a.onload=function(){b()};a.src=c;document.getElementsByTagName("head")[0].appendChild(a)};
            loadScript("https://prod.api.adline.com/api/cpa?key=UID-{YOUR_UNIQUE_CUSTOMER_ID}", function(){});
        </script>

This script will enable you to monitor three types of events:

  1. Page Loads: Tracking when users load a page on your website.
  2. Page Unloads: Tracking when users leave or unload a page.
  3. Button/Link Clicks: Tracking when users interact with buttons or links on your website.

Each of these captured events is immediately transmitted to the Adline Tracking Server (ATS) for further processing.

Adline Tracking Server (ATS)

The Adline Tracking Server is the backbone of our tracking system, responsible for collecting and organizing the data from your website. ATS also facilitates the creation of reports based on this data. Additionally, ATS can fetch essential elements from your website, such as pages, links, and buttons, using a specialized scraping service. If you have an organized, standard sitemap.xml file, this process will go quicker.

Scraping Service

Our scraping service is designed to explore your website by visiting each link specified in your sitemap.xml file. It then stores the relevant information in our database. This feature is particularly useful for configuring which buttons and page visits should be categorized as conversion goals for specific Adline Ad Campaigns. The data is stored in a table containing:

  • Adline Ad Campaign ID
  • Customer ID
  • URL or Button Identifier

For example, you can configure a conversion by specifying that the pageview "mysite.com/payment/success" should be considered as a conversion event.

Conversion Tracking

Once a conversion event is recognized, it is promptly sent to our Conversion Uploader service. This service is responsible for syncing the events to the advertising channels, whether it's Google Ads or Facebook Ads.

Adline Tracking Script and Server

Notably, when a visitor clicks on an ad from Google or Facebook and gets redirected to your website, our system captures and stores unique identifiers such as gclid (for Google) or fbclid (for Facebook). These identifiers are used when pushing conversions to the respective advertising platforms through their conversion APIs.

A session or a click is stored for over a 30-day window. So if a prospect clicked on your ad on day 1, but converted on day 23, then this conversion will be attributed to the ad that generated the conversion.

In summary, the Adline Tracking Script and Adline Tracking Server work seamlessly to track user interactions on your website and provide valuable insights for optimizing your advertising campaigns on Google and Facebook, including;

Make automatic budgeting optimizations across channels to maximize your ROAS. Tracking and analyzing Cost Per Action: I.e. cost per lead or however you define the goal.

 

For further assistance or inquiries, please don't hesitate to contact our support team at support@adline.com.