Standard integration

Basic Integration

1In the <head> section of the HTML page the following <script> tags must be included:

HTML

<html>
  <head>
    <title> Adtailor Integration <title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <script src="https://az801420.vo.msecnd.net/atjs/api-1.5.js"></script>
  </head>
	<body>

	</body>
</html>
					
Copy to clipboard

2In the <body> section of the HTML page the following example javascript code must be included:

JS

<html>
 <head>
     <title> Adtailor Integration <title>
         <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
         <script src="https://az801420.vo.msecnd.net/atjs/api-1.5.js"></script>
 </head>
 <body>
    <script> 
     function callback_function(adtailorData) {
        // YOUR CODE HERE 
     }
     try {
       load_adtailor_data(”callback_function”,async,userid,timestamp,token,group,pixel);
     } catch(err) {
         //if for some reason javascript source was not loaded 
     } 
   </script>
  </body>
</html>

					
Copy to clipboard

PHP Integration

PHP



<?php
	$apiKey = "ABCDEFGHIGKLMNOPQRSTUVWXYZ123456";
	$timestamp = number_format(round(microtime(true) * 1000),0,"","");
	$token = md5($timestamp.$apiKey);
	$userId = "111111";
?>

<html>
  <head>
     <title> Adtailor Integration <title>
     <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
     <script src="https://az801420.vo.msecnd.net/atjs/api-1.5.js"></script>
  </head>
  <body>
      <script>
	function onAdtailorDataLoad(adtailorData) {
	   document.write("Fingerprint:" + adtailorData.fingerprint + "<br>");
	   document.write("Country:" + adtailorData.country + "<br>");
	   document.write("State:" + adtailorData.state + "<br>");
	   document.write("City:" + adtailorData.city + "<br>");
	   document.write("Zip:" + adtailorData.zip + "<br>");
	   document.write("OS Family:" + adtailorData.osFamily + "<br>");
	   document.write("OS Name:" + adtailorData.osName + "<br>");
	   document.write("Browser Family:" + adtailorData.browserFamily + "<br>");
	   document.write("Browser Name:" + adtailorData.browserName + "<br>");
	   document.write("Screen Width:" + adtailorData.screenWidth + "<br>");
	   document.write("Screen Height:" + adtailorData.screenHeight + "<br>");
	   document.write("Ethnicity:" + adtailorData.ethnicity + "<br>");
	   document.write("HouseholdIncome:" + adtailorData.householdIncome + "<br>");
	   document.write("HouseholdIncomeLocal:" + adtailorData.householdIncomeLocal + "<br>");
	   document.write("Age:" + adtailorData.age + "<br>");
	   document.write("Education:" + adtailorData.education + "<br>");
	   document.write("HealthInsurance:" + adtailorData.healthInsurance + "<br>");
	   document.write("PovertyLevel:" + adtailorData.povertyLevel + "<br>");
	   document.write("CrashDeath:" + adtailorData.crashDeath + "<br>");
	   document.write("Diabetes:" + adtailorData.diabetes + "<br>");
	   document.write("DiabeticScreening:" + adtailorData.diabeticScreening + "<br>");
	   document.write("ExcessiveDrinking:" + adtailorData.excessiveDrinking + "<br>");
	   document.write("FastFood:" + adtailorData.fastFood + "<br>");
	   document.write("FineParticulateMatter:" + adtailorData.fineParticulateMatter + "<br>");
	   document.write("MammographyScreening:" + adtailorData.mammographyScreening + "<br>");
	   document.write("Obesity:" + adtailorData.obesity + "<br>");
	   document.write("PhysicalInactivity:" + adtailorData.physicalInactivity + "<br>");
	   document.write("PoorHealth:" + adtailorData.poorHealth + "<br>");
	   document.write("PrematureDeath:" + adtailorData.prematureDeath + "<br>");
	   document.write("RecreationalFacilities:" + adtailorData.recreationalFacilities + "<br>");
	   document.write("SexTransDis:" + adtailorData.sexTransDis + "<br>");
	   document.write("Smoking:" + adtailorData.smoking + "<br>");
	   document.write("TeenBirth:" + adtailorData.teenBirth + "<br>");
	   document.write("Crime:" + adtailorData.crime + "<br>");
	   document.write("Unemployment:" + adtailorData.unemployment + "<br>");
	   document.write("Mortgage:" + adtailorData.mortgage + "<br>");
	   document.write("CreditRate:" + adtailorData.creditRate + "<br>");
	 }
	 try {
		 load_adtailor_data ("onAdtailorDataLoad",true,"<?php echo $userId ?>", "<?php echo $timestamp ?>", "<?php echo $token ?>");
	 } catch (err) {
		 alert(err);
	 }
    </script>
  </body>
</html>

					
Copy to clipboard

Java Integration

Java



<%@page import="java.security.MessageDigest">
<%!
	public String md5(String string) {
	StringBuffer buff = new StringBuffer();
	try {
	MessageDigest md = MessageDigest.getInstance("MD5");
	md.update(string.getBytes());
	byte[] bytes = md.digest();

	for ( int i = 0; i < bytes.length; i++ ) {
	String s = Integer.toHexString(bytes[i] & 0xFF);
	if ( s.length() == 1 )
	buff.append("0");

	 buff.append(s);
	}
	} catch (Exception e) {}
	return buff.toString();
	}
%>
<%
	String apiKey = "123456789012345678901234567890";
	long timestamp = System.currentTimeMillis();
	String token = md5(timestamp+apiKey);
	String userId = "111111";
%>

<html>
   <head>
        <title> Adtailor Integration <title>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
        <script src="https://az801420.vo.msecnd.net/atjs/api-1.5.js"></script>
   </head>
   <body>
      <script>
	  function onAdtailorDataLoad(adtailorData) {
	    document.write("Fingerprint:" + adtailorData.fingerprint + "<br>");
	    document.write("Country:" + adtailorData.country + "<br>");
	    document.write("State:" + adtailorData.state + "<br>");
	    document.write("City:" + adtailorData.city + "<br>");
	    document.write("Zip:" + adtailorData.zip + "<br>");
	    document.write("OS Family:" + adtailorData.osFamily + "<br>");
	    document.write("OS Name:" + adtailorData.osName + "<br>");
	    document.write("Browser Family:" + adtailorData.browserFamily + "<br>");
	    document.write("Browser Name:" + adtailorData.browserName + "<br>");
	    document.write("Screen Width:" + adtailorData.screenWidth + "<br>");
	    document.write("Screen Height:" + adtailorData.screenHeight + "<br>");
	    document.write("Ethnicity:" + adtailorData.ethnicity + "<br>");
	    document.write("HouseholdIncome:" + adtailorData.householdIncome + "<br>");
	    document.write("HouseholdIncomeLocal:" + adtailorData.householdIncomeLocal + "<br>");
	    document.write("Age:" + adtailorData.age + "<br>");
	    document.write("Education:" + adtailorData.education + "<br>");
	    document.write("HealthInsurance:" + adtailorData.healthInsurance + "<br>");
	    document.write("PovertyLevel:" + adtailorData.povertyLevel + "<br>");
	    document.write("CrashDeath:" + adtailorData.crashDeath + "<br>");
	    document.write("Diabetes:" + adtailorData.diabetes + "<br>");
	    document.write("DiabeticScreening:" + adtailorData.diabeticScreening + "<br>");
	    document.write("ExcessiveDrinking:" + adtailorData.excessiveDrinking + "<br>");
	    document.write("FastFood:" + adtailorData.fastFood + "<br>");
	    document.write("FineParticulateMatter:" + adtailorData.fineParticulateMatter + "<br>");
	    document.write("MammographyScreening:" + adtailorData.mammographyScreening + "<br>");
	    document.write("Obesity:" + adtailorData.obesity + "<br>");
	    document.write("PhysicalInactivity:" + adtailorData.physicalInactivity + "<br>");
	    document.write("PoorHealth:" + adtailorData.poorHealth + "<br>");
	    document.write("PrematureDeath:" + adtailorData.prematureDeath + "<br>");
	    document.write("RecreationalFacilities:" + adtailorData.recreationalFacilities + "<br>");
	    document.write("SexTransDis:" + adtailorData.sexTransDis + "<br>");
	    document.write("Smoking:" + adtailorData.smoking + "<br>");
	    document.write("TeenBirth:" + adtailorData.teenBirth + "<br>");
	    document.write("Crime:" + adtailorData.crime + "<br>");
	    document.write("Unemployment:" + adtailorData.unemployment + "<br>");
	    document.write("Mortgage:" + adtailorData.mortgage + "<br>");
	    document.write("CreditRate:" + adtailorData.creditRate + "<br>");
	 }
         try {
	   load_adtailor_data ("onAdtailorDataLoad",true,"<%=userId%>", "<%=timestamp%>", "<%=token%>");

	 } catch (err) {
		 alert(err);
	 }
	</script>
    </body>
</html>

					
Copy to clipboard

Event Pixel Integration

1In the head section of the HTML page the following <script> tags must be included:

HTML

<html>
  <head>
    <title> Adtailor Integration <title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <script src="https://az801420.vo.msecnd.net/atjs/pixel-1.3.js"></script>
  </head>
	<body>
	</body>
</html>
					
Copy to clipboard

2In the body section of the HTML page the following example javascript code must be included:

JS

<html>
  <head>
     <title> Adtailor Integration <title>
     <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
     <script src="https://az801420.vo.msecnd.net/atjs/api-1.5.js"></script>
  </head>
  <body>
    <script>
	try {
	  adtailor_pixel(userid , group , pixel);
      } catch(err) {}
    </script>
  </body>
</html>

					
Copy to clipboard
Parameter Type Description Geo Availability
userid mandatory API User ID United States United Kingdom Canada Australia
group optional Optional parameter which can be used for additional tracking United States United Kingdom Canada Australia
pixel optional Optional parameter which can be used for additional tracking United States United Kingdom Canada Australia

Code Example:


<html>
  <head>
    <title> Adtailor Integration <title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <script src="./pixel-1.3-orig.js"></script>
  </head>
    <body>
      <script>
	    try {
	  adtailor_pixel("111111", "Group Name","Pixel Name", "<%=ip%>");
        } catch(err) {}
      </script>
    </body>
</html>
					

Real World Examples

How to change images?

1. Use case : Change image with Adtailor's "age"property

In this example we will see how we can change images based on Adtailor's API properties. Let's say we have a website through which we sell cosmetics. We want to dynamically change the image for the jumbotron section based on user's age. As shown below we have an image with a beautiful young lady loading when we open the website at first. But we want this image to be flexible and change in accordance with user's age. Let's see how we can tailor the appropriate image with Adtailor's API.

1Find the element that holds the image and insert an id. In this case we insert id attribute with the value "changeImg" :

Code Example:




<div class="image-wrapper">
	<div id="cahngeImg"></div>
</div>


					

Code Example:




#changeImg {
	background-image: url("../example/young.jpg");
}


					

2 Below is shown the Javascript code which selects the element with the background image and by calling Adtailor's object property checks if the user's age is above average and if that case is true the default image is replaced by the new one.

Code Example:



<script>

  function onAdtailorDataLoad(adtailorData) {
    var image = document.getElementById("#cahngeImg");

    if( adtailorData.age > 3 ) {  // Where > 3 means age above average
      image.style.backgroundImage = url("../example/old-woman.jpg");
    }
 }

</script>
					

Below you can see the result after we have executed our code...

2. Use case : Change image with Adtailor's "ethnicity"property

In this example we will see how we can change images based on Adtailor's ethnicity property.

Code Example:



<script>

  function onAdtailorDataLoad(adtailorData) {
	var image = document.getElementById("#cahngeImg");

	switch(adtailorData.ethnicity) {
	  case 2:   // Loads hispanic image
	     image.style.backgroundImage = url("../example/hispanic.jpg")
	     break;
	  case 3:   // Loads african-american image
		 image.style.backgroundImage = url("../example/african.jpg")
		 break;
	  case 4:   // Loads asian image
		 image.style.backgroundImage = url("../example/asian.jpg")
		 break;
	  case 6:   // Loads Native Hawaiian image
		 image.style.backgroundImage = url("../example/hawaii.jpg")
		 break;
	  default:
		 image.style.backgroundImage = url("../example/young.jpg")

	}

 }

</script>
					

Below you see the output of our code. You can see the four cases we are checking for and how the image changes according to what Adtailor's object returns as a result.

First case : loads Hispanic image if the result is 2
Second case : loads African-American image if the result is 3
Third case : loads Asian image if the result is 4
Fourth case : loads Native Hawaiian image if the result is 6

How to tailor products according to your users' income profile?

1. Use case : Change text with Adtailor's householdIncomeproperty

In this case scenario we will use Adtailor's householdIncome property. We have a website selling sunglases and we want to load content based on user's household income. If we have users with low income we want to load products which have lower price and vise versa. Here's how we can do this.

1 First we need to set the variables for our containers. Below is the html representing the structure.

Code Example:



 <div id="productsContainer">

    <div class="product-first">
	  <img src="products/high-income-1.jpg" alt="">
	  <p class="product-text">Ray-Ban  RB41897</p>
	  <p class="product-price">557,00 USD7</p>
    </div>

    <div class="product-second">
	  <img src="products/high-income-2.jpg" alt="">
	  <p class="product-text">Ray-Ban  RB41897</p>
	  <p class="product-price">645,00 USD7</p>
    </div>

 </div>
	   
      
					

2 In this case we will use jQuery to change the sources and the laod products:

Code Example:



<script>

 function onAdtailorDataLoad(adtailorData) {
   var prodContainer = $("#productsContainer");

   var firstProductImg  = prodContainer.find(".product-first").find("img");
   var firstProductName = prodContainer.find(".product-first").find(".product-text");
   var firstProductPrice = prodContainer.find(".product-first").find(".product-price");

   var secondProductImg  = prodContainer.find(".product-second").find("img");
   var secondProductName = prodContainer.find(".product-second").find(".product-text");
   var secondProductPrice = prodContainer.find(".product-second").find(".product-price");

   if( adtailorData.householdIncome > 3 ) {
         firstProductImg.attr("src","products/high-income-1.jpg");
         firstProductName.html("Marc Jacobs MJ 525/S 6PM");
   	 firstProductPrice.html("1.594,00 USD");

   	 secondProductImg.attr("src","products/high-income-1.jpg");
   	 secondProductName.html("Ray Ban ERIKA 525/S 6PM");
   	 secondProductPrice.html("1.557,00 USD");

   }
 }	

</script>

					

Below you see the output of our code and how our content changed dynamically

Customize your banners by using multiple parameters

In this case scenario we will use Adtailor's obesity , crashDeath , diabetes , excessiveDrinking , smoking , householdIncome properties. We have a website selling sunglases and we want to load content based on user's household income. If we have users with low income we want to load products which have lower price and vise versa. Here's how we can do this.

Below are outlined the containers which will be changing their content based on the new proeperties' detection. We have four containers with the id names as follow : container1 , container2 , container3.

Here is the HTML code which holds the containers.

Code Example:



 <div id="productsContainer">

    <div class="product-first">
	  <img src="products/high-income-1.jpg" alt="">
	  <p class="product-text">Ray-Ban  RB41897</p>
	  <p class="product-price">557,00 USD7</p>
    </div>

    <div class="product-second">
	  <img src="products/high-income-2.jpg" alt="">
	  <p class="product-text">Ray-Ban  RB41897</p>
	  <p class="product-price">645,00 USD7</p>
    </div>

 </div>
	   
      
					

Below you see the output of the code code and how our content changes dynamically

Customize your pop-up window ( Real Estate Agency )

In this case scenario we will combine Adtailor's properties to achieve the final result. We have a real estate website where a pop up window with different offers appears everytime a user lands on our page. We want this window to be flexible and customizable based on the user's profile. In this example we will use the householdIncome and age properties. Below you can see the window which randomly loads special offers every time a user enters our system. In red color are hightlighted the places which should become dynamic and change according to what Adtailor's function returns and their relevant "id" names.

Below you see the JSON file which holds the new content which will replace the default values if we have a match in our conditions for the user profile.

Code Example :



{
    "estatesOffer" : [
      {
    	"id": 1,
    	"name": "Single family house",
    	"image": "estate_1.jpg",
    	"price": 155.000,
    	"location": "Texas",
    	"description": "2300 S 5th St APT B, Austin, TX, Condo/townhome/row home/co-op"
      } ,
      {
    	"id": 2,
    	"name": "New Construction",
    	"image": "estate_2.jpg",
    	"price": 1.750.000,
    	"location": "South Carolina",
    	"description": "2275 Swallow Hill Rd, Condo/townhome/row home/co-op"
      } ,
      {
    	"id": 3,
    	"name": "1-bedroom apartment",
    	"image": "estate_3.jpg",
    	"price": 155.000,
    	"location": "North Carolina",
    	"description": "1000 Main Campus Drive, Condo/townhome/row home/co-op"
      } ,
      {
    	"id": 4,
    	"name": "5-bedroom apartment",
    	"image": "estate_3.jpg",
    	"price": 950.000,
    	"location": "Pennsylvania",
    	"description": "340 E 93rd St Unit 19EF, Condo/townhome/row home/co-op"
      }
    ]
}
	   
      
					

Basically as we saw in our JSON file we have 4 offers which we want to have preference and show if we have match in our conditions. In this case we want to build conditions which check our user's age and houseHoldIncome. If their age is above average and their household-income is the same as well, we want to visualize the New Construction offer ( an expensive house ). If their age is above average and their household-income is below average, we want to visualize the Single family house offer ( a cheap house ). Below is shown the JavaScript code which is doing the thing. When the age is below average and the household-income is above average, we want to visualize the 5-bedroom apartment offer ( an expensive apartment ).And in the last case if the age is below average and the household-income is below average, we want to visualize the 1-bedroom apartment offer ( a cheap apartment ) Below is shown the JavaScript code which is doing the thing.

Code Example:



<script>

 function onAdtailorDataLoad(adtailorData) {

   var estateHeading = $("#estateHeading");
   var estatePrice = $("#estatePrice");
   var estateLocation = $("#estateLocation");
   var estateDesc = $("#estateDesc");
   var estateImage = $("#estateImage");

   if( adtailorData.householdIncome > 3  &&  adtailorData.age > 3 ) {
   		estateImage.css("background-image" , "url(../images/old-high.jpg)");
   		estateHeading.html("New contstruction");
		estatePrice.html("1.750.000");
		estateLocation.html("South Carolina");
		estateDesc.html("...");
   }

   if( adtailorData.householdIncome > 3  &&  adtailorData.age < 3 ) {
   		estateImage.css("background-image" , "url(../images/young-high.jpg)");
   		estateHeading.html("Single family house");
		estatePrice.html("155.000");
		estateLocation.html("Texas");
		estateDesc.html("...");
   }

   if( adtailorData.householdIncome < 3  &&  adtailorData.age > 3 ) {
   		estateImage.css("background-image" , "url(../images/young-low.jpg)");
   		estateHeading.html("5-bedroom apartment");
		estatePrice.html("950.000");
		estateLocation.html("Pennsylvania");
		estateDesc.html("...");
   }

   if( adtailorData.householdIncome < 3  &&  adtailorData.age < 3 ) {
   		estateImage.css("background-image" , "url(../images/young-low.jpg)");
   		estateHeading.html("1-bedroom apartment");
		estatePrice.html("130.000");
		estateLocation.html("North Carolina");
		estateDesc.html("...");
   }
 }	

</script>

					

adtailorData.householdIncome > 3 and adtailorData.age > 3

adtailorData.householdIncome > 3 and adtailorData.age < 3

adtailorData.householdIncome < 3 and adtailorData.age > 3

adtailorData.householdIncome < 3 and adtailorData.age < 3

Javascript API Documentation

Parameters

Parameter Type Description
callback mandatory Callback function processing received Adtailor data
async mandatory Type of the ajax request (true/false)
userid mandatory API User ID
timestamp mandatory 13 digits number of milliseconds since the Unix Epoch (January 1 1970 00:00:00 GMT)
token mandatory token is generated by formula:token=md5(timestamp+ApiKey)
group optional Optional parameter which can be used for additional tracking
pixel optional Optional parameter which can be used for additional tracking

Results

Data is stored in javascript object (adtailorData):
Parameter Type Description Geo Availability
fingerprint Browser fingerprint - United States United Kingdom Canada Australia
country ISO 3166 Country Code - United States United Kingdom Canada Australia
state ISO 3166 State/Province Code - United States United Kingdom Canada Australia
city Town/City - United States United Kingdom Canada Australia
zip Zip / Postal Code - United States United Kingdom Canada Australia
osFamily OS Family - United States United Kingdom Canada Australia
osName OS Name - United States United Kingdom Canada Australia
browserFamily Browser Family - United States United Kingdom Canada Australia
browserName Browser Name - United States United Kingdom Canada Australia
screenWidth Screen Width - United States United Kingdom Canada Australia
screenHeight Screen Height - United States United Kingdom Canada Australia
ethnicity Ethnic Background
  • 0 - Unknown
  • 1 - White
  • 2 - Hispanic or Latino
  • 3 - African American
  • 4 - Asian
  • 5 - Native American
  • 6 - Native Hawaiian
  • 7 - Indian
  • 8 - Other
  • 9 - Mixed
United States United Kingdom Canada Australia
age Integer
  • 0 - Unknown
  • 1 - Young
  • 2 - Younger
  • 3 - Average Age
  • 4 - Older
  • 5 - Senior
United States United Kingdom Canada Australia
education Education Level
  • 0 - Unknown
  • 1 - Not Well Educated
  • 2 - Bellow Average
  • 3 - Average
  • 4 - Above Average
  • 5 - Highly Educated
United States United Kingdom Canada Australia
householdIncome Household Income Compared to National Averages
  • 0 - Unknown
  • 1 - Low Income
  • 2 - Below Average Income
  • 3 - Average Income
  • 4 - Higher Income
  • 5 - Highest Income
United States United Kingdom Canada Australia
householdIncomeLocal Localized Household Income, Compared to State or Provincial Averages
  • 0 - Unknown
  • 1 - Low Income
  • 2 - Below Average Income
  • 3 - Average Income
  • 4 - Higher Income
  • 5 - Highest Income
United States United Kingdom Canada Australia
healthInsurance Health Insurance Coverage
  • 0 - Unknown
  • 1 - Unlikely Covered
  • 2 - Less Likely Covered
  • 3 - Likely Covered
  • 4 - More Likely Covered
  • 5 - Almost Certainly Covered
United States
povertyLevel Risk of Poverty
  • 0 - Unknown
  • 1 - Low Risk of Poverty
  • 2 - Below Average Risk
  • 3 - At Average Risk
  • 4 - Above Average Risk
  • 5 - High Risk of Poverty
United States United Kingdom Canada Australia
crashDeath Motor Vehicle Crash Deaths
  • 0 - Unknown
  • 1 - Low Accident Death Rate
  • 2 - Below Average
  • 3 - Average Rate
  • 4 - Above Average
  • 5 - High Accident Death Rate
United States
diabetes Prevelence of Diabetes
  • 0 - Unknown
  • 1 - Highly Unlikely Diabetic
  • 2 - Not Likely Diabetic
  • 3 - Average
  • 4 - More Likely Diabetic
  • 5 - Very Likely Diabetic
United States United Kingdom Canada Australia
diabeticScreening Likelihood to Have Had Undergone Screening for Diabetes
  • 0 - Unknown
  • 1 - Have Not Screened for Diabetes
  • 2 - Less Likely to Have Screened
  • 3 - Average
  • 4 - More Likely to Have Screened
  • 5 - Most Likely Had Diabetic Screening
United States
excessiveDrinking Likelihood to Drink Excessively
  • 0 - Unknown
  • 1 - Highly Unlikely to Abuse Alcohol
  • 2 - Unlikely
  • 3 - Average Drinking Habits
  • 4 - Likely to Abuse Alcohol
  • 5 - Very Likely to Drink Excessively
United States United Kingdom Canada Australia
fastFood Availability of and Access to Fast Food Restaurants
  • 0 - Unknown
  • 1 - Not Many Available
  • 2 - Below Average Availability
  • 3 - Average
  • 4 - Above Average Availability
  • 5 - Many Available
United States
fineParticulateMatter Air Pollution - Fine Particulate Matter
  • 0 - Unknown
  • 1 - Very Clean Air
  • 2 - Clean Air
  • 3 - Average Air Pollution
  • 4 - Polluted Air
  • 5 - Very Polluted Air
United States
mammographyScreening Likelihood to Have Had Undergone Mammography Screening
  • 0 - Unknown
  • 1 - Highly Unlikely to Have Had Mammography Screening
  • 2 - Less Likely
  • 3 - Average
  • 4 - More Likely
  • 5 - Very Unlikely to Have Had Mammography Screening
United States
obesity Obesity
  • 0 - Unknown
  • 1 - Highly Unlikely Obese
  • 2 - Unlikely to be Obese
  • 3 - Average Weight
  • 4 - Likely Obese
  • 5 - Very Likely Obese
United States United Kingdom Canada Australia
physicalInactivity Likeliness to be Physical Inactivity
  • 0 - Unknown
  • 1 - Very Active Physically
  • 2 - Phisically Active
  • 3 - Average Physical Activity
  • 4 - Phisically Inactive
  • 5 - Highly Inactive Physically
United States United Kingdom Canada Australia
poorHealth Poor or Fair Health
  • 0 - Unknown
  • 1 - In Good Health
  • 2 - Healthier than Average
  • 3 - Averagely Healthy
  • 4 - Less Healthy than Average
  • 5 - In Poor Health
United States United Kingdom Canada Australia
prematureDeath Risk of Premature Death
  • 0 - Unknown
  • 1 - Low Risk of Premature Death
  • 2 - Below Average Risk
  • 3 - Average Risk
  • 4 - Higher Risk
  • 5 - High Risk of Premature Death
United States United Kingdom Canada Australia
recreationalFacilities Access to Recreational Facilities
  • 0 - Unknown
  • 1 - Limited Access to Recreational Facilities
  • 2 - Below Average Access
  • 3 - Average Access
  • 4 - Better Access
  • 5 - Good Access to Recreational Facilities
United States
sexTransDis Sexual Transmitted Diseases
  • 0 - Unknown
  • 1 - Low Instanes ot STD
  • 2 - Bellow Average
  • 3 - Average
  • 4 - Higher than Normal STD
  • 5 - Highest Instances of STD
United States United Kingdom
smoking Smoking Habits
  • 0 - Unknown
  • 1 - Almost Certainly Non-Smoker
  • 2 - Likely Non-Smoker
  • 3 - Average Smoking
  • 4 - Likely Smoker
  • 5 - Very Likely to Smoke
United States United Kingdom Canada Australia
teenBirths Teen Births
  • 0 - Unknown
  • 1 - Low Teen Birth Rates
  • 2 - Bellow Average
  • 3 - Average
  • 4 - Above Average
  • 5 - High Teen Birth Rates
United States
crime Violent Crimes
  • 0 - Unknown
  • 1 - Low Probability of Violent Crime
  • 2 - Less Likely to be a Victim
  • 3 - Average
  • 4 - More Likely to be a Victim
  • 5 - High Probability of Violent Crime
United States United Kingdom Canada Australia
unemployment Unemployment
  • 0 - Unknown
  • 1 - Almost Certainly Employed
  • 2 - Likely Employed
  • 3 - Average
  • 4 - More Likely Unemployed
  • 5 - Very Likely Unemployed
United States United Kingdom Canada Australia
mortgage Mortgage
  • 0 - Unknown
  • 1 - Does Not Have a Mortgage
  • 2 - Less Likely to Have a Mortgage
  • 3 - Average
  • 4 - More Likely to Have a Mortgage
  • 5 - Almost Certainly Has Mortgage
United States
election Voting Preferences (US only)
  • 0 - Unknown
  • 1 - Voted for Democratic Candidate
  • 2 - Voted for Republican Candidate
United States
creditRate Credit Score
  • 0 - Unknown
  • 1 - Under 620
  • 2 - 620-660
  • 3 - 660-700
  • 4 - 700-760
  • 5 - Over 760
United States

Server-to-server API

Server-to-server API

URL https://www.adtailor.com/api/api.1.1

Parameters

Parameter Type Description
userid mandatory API User ID
ApiKey mandatory API Key
ip mandatory IP Address
format mandatory Result format , values json | xml
group optional Optional parameter which can be used for additional tracking
pixel optional Optional parameter which can be used for additional tracking

Results

Data is stored in javascript object (adtailorData):
Parameter Type Description Geo Availability
country ISO 3166 Country Code - United States United Kingdom Canada Australia
state ISO 3166 State/Province Code - United States United Kingdom Canada Australia
city Town/City - United States United Kingdom Canada Australia
zip Zip / Postal Code - United States United Kingdom Canada Australia
ethnicity Ethnic Background
  • 0 - Unknown
  • 1 - White
  • 2 - Hispanic or Latino
  • 3 - African American
  • 4 - Asian
  • 5 - Native American
  • 6 - Native Hawaiian
  • 7 - Indian
  • 8 - Other
  • 9 - Mixed
United States United Kingdom Canada Australia
age Integer
  • 0 - Unknown
  • 1 - Young
  • 2 - Younger
  • 3 - Average Age
  • 4 - Older
  • 5 - Senior
United States United Kingdom Canada Australia
education Education Level
  • 0 - Unknown
  • 1 - Not Well Educated
  • 2 - Bellow Average
  • 3 - Average
  • 4 - Above Average
  • 5 - Highly Educated
United States United Kingdom Canada Australia
householdIncome Household Income Compared to National Averages
  • 0 - Unknown
  • 1 - Low Income
  • 2 - Below Average Income
  • 3 - Average Income
  • 4 - Higher Income
  • 5 - Highest Income
United States United Kingdom Canada Australia
householdIncomeLocal Localized Household Income, Compared to State or Provincial Averages
  • 0 - Unknown
  • 1 - Low Income
  • 2 - Below Average Income
  • 3 - Average Income
  • 4 - Higher Income
  • 5 - Highest Income
United States United Kingdom Canada Australia
healthInsurance Health Insurance Coverage
  • 0 - Unknown
  • 1 - Unlikely Covered
  • 2 - Less Likely Covered
  • 3 - Likely Covered
  • 4 - More Likely Covered
  • 5 - Almost Certainly Covered
United States
povertyLevel Risk of Poverty
  • 0 - Unknown
  • 1 - Low Risk of Poverty
  • 2 - Below Average Risk
  • 3 - At Average Risk
  • 4 - Above Average Risk
  • 5 - High Risk of Poverty
United States United Kingdom Canada Australia
crashDeath Motor Vehicle Crash Deaths
  • 0 - Unknown
  • 1 - Low Accident Death Rate
  • 2 - Below Average
  • 3 - Average Rate
  • 4 - Above Average
  • 5 - High Accident Death Rate
United States
diabetes Prevelence of Diabetes
  • 0 - Unknown
  • 1 - Highly Unlikely Diabetic
  • 2 - Not Likely Diabetic
  • 3 - Average
  • 4 - More Likely Diabetic
  • 5 - Very Likely Diabetic
United States United Kingdom Canada Australia
diabeticScreening Likelihood to Have Had Undergone Screening for Diabetes
  • 0 - Unknown
  • 1 - Have Not Screened for Diabetes
  • 2 - Less Likely to Have Screened
  • 3 - Average
  • 4 - More Likely to Have Screened
  • 5 - Most Likely Had Diabetic Screening
United States
excessiveDrinking Likelihood to Drink Excessively
  • 0 - Unknown
  • 1 - Highly Unlikely to Abuse Alcohol
  • 2 - Unlikely
  • 3 - Average Drinking Habits
  • 4 - Likely to Abuse Alcohol
  • 5 - Very Likely to Drink Excessively
United States United Kingdom Canada Australia
fastFood Availability of and Access to Fast Food Restaurants
  • 0 - Unknown
  • 1 - Not Many Available
  • 2 - Below Average Availability
  • 3 - Average
  • 4 - Above Average Availability
  • 5 - Many Available
United States
fineParticulateMatter Air Pollution - Fine Particulate Matter
  • 0 - Unknown
  • 1 - Very Clean Air
  • 2 - Clean Air
  • 3 - Average Air Pollution
  • 4 - Polluted Air
  • 5 - Very Polluted Air
United States
mammographyScreening Likelihood to Have Had Undergone Mammography Screening
  • 0 - Unknown
  • 1 - Highly Unlikely to Have Had Mammography Screening
  • 2 - Less Likely
  • 3 - Average
  • 4 - More Likely
  • 5 - Very Unlikely to Have Had Mammography Screening
United States
obesity Obesity
  • 0 - Unknown
  • 1 - Highly Unlikely Obese
  • 2 - Unlikely to be Obese
  • 3 - Average Weight
  • 4 - Likely Obese
  • 5 - Very Likely Obese
United States United Kingdom Canada Australia
physicalInactivity Likeliness to be Physical Inactivity
  • 0 - Unknown
  • 1 - Very Active Physically
  • 2 - Phisically Active
  • 3 - Average Physical Activity
  • 4 - Phisically Inactive
  • 5 - Highly Inactive Physically
United States United Kingdom Canada Australia
poorHealth Poor or Fair Health
  • 0 - Unknown
  • 1 - In Good Health
  • 2 - Healthier than Average
  • 3 - Averagely Healthy
  • 4 - Less Healthy than Average
  • 5 - In Poor Health
United States United Kingdom Canada Australia
prematureDeath Risk of Premature Death
  • 0 - Unknown
  • 1 - Low Risk of Premature Death
  • 2 - Below Average Risk
  • 3 - Average Risk
  • 4 - Higher Risk
  • 5 - High Risk of Premature Death
United States United Kingdom Canada Australia
recreationalFacilities Access to Recreational Facilities
  • 0 - Unknown
  • 1 - Limited Access to Recreational Facilities
  • 2 - Below Average Access
  • 3 - Average Access
  • 4 - Better Access
  • 5 - Good Access to Recreational Facilities
United States
sexTransDis Sexual Transmitted Diseases
  • 0 - Unknown
  • 1 - Low Instanes ot STD
  • 2 - Bellow Average
  • 3 - Average
  • 4 - Higher than Normal STD
  • 5 - Highest Instances of STD
United States United Kingdom
smoking Smoking Habits
  • 0 - Unknown
  • 1 - Almost Certainly Non-Smoker
  • 2 - Likely Non-Smoker
  • 3 - Average Smoking
  • 4 - Likely Smoker
  • 5 - Very Likely to Smoke
United States United Kingdom Canada Australia
teenBirths Teen Births
  • 0 - Unknown
  • 1 - Low Teen Birth Rates
  • 2 - Bellow Average
  • 3 - Average
  • 4 - Above Average
  • 5 - High Teen Birth Rates
United States
crime Violent Crimes
  • 0 - Unknown
  • 1 - Low Probability of Violent Crime
  • 2 - Less Likely to be a Victim
  • 3 - Average
  • 4 - More Likely to be a Victim
  • 5 - High Probability of Violent Crime
United States United Kingdom Canada Australia
unemployment Unemployment
  • 0 - Unknown
  • 1 - Almost Certainly Employed
  • 2 - Likely Employed
  • 3 - Average
  • 4 - More Likely Unemployed
  • 5 - Very Likely Unemployed
United States United Kingdom Canada Australia
mortgage Mortgage
  • 0 - Unknown
  • 1 - Does Not Have a Mortgage
  • 2 - Less Likely to Have a Mortgage
  • 3 - Average
  • 4 - More Likely to Have a Mortgage
  • 5 - Almost Certainly Has Mortgage
United States
election Voting Preferences (US only)
  • 0 - Unknown
  • 1 - Voted for Democratic Candidate
  • 2 - Voted for Republican Candidate
United States
creditRate Credit Score
  • 0 - Unknown
  • 1 - Under 620
  • 2 - 620-660
  • 3 - 660-700
  • 4 - 700-760
  • 5 - Over 760
United States

JSON Example

Request : https://www.adtailor.com/api/api.1.1?userid=xxxxxx&ApiKey=xxxxxxxxxxxxxxxxxxxxxxxxx&ip=67.174.52.124&format=json

JSON


    
{
   "Country": "US",
   "State": "CA",
   "City": "Orangevale",
   "Zip": "95662",
   "Ethnicity": "1",
   "HouseholdIncome": "4",
   "Age": "2",
   "Education": "3",
   "HealthInsurance": "3",
   "PovertyLevel": "3",
   "CrashDeath": "1",
   "Diabetes": "2",
   "DiabeticScreening": "2",
   "ExcessiveDrinking": "4",
   "FastFood": "3",
   "FineParticulateMatter": "3",
   "MammographyScreening": "3",
   "Obesity": "2",
   "PhysicalInactivity": "2",
   "PoorHealth": "3",
   "PrematureDeath": "2",
   "RecreationalFacilities": "3",
   "SexTransDis": "4",
   "Smoking": "2",
   "TeenBirths": "3",
   "Crime": "4",
   "Unemployment": "0",
   "Mortgage": "5",
   "Election": "1",
   "HouseholdIncomeLocal": "3",
   "CreditRate": "4"
}



					

XML Example

Request :https://www.adtailor.com/api/api.1.1?userid=xxxxxx&ApiKey=xxxxxxxxxxxxxxxxxxxxxxxxx&ip=67.174.52.124&format=xml

XML

                     
                         
  <Response>
    <Country>US</Country>
    <State>CA</State>
    <City>Orangevale</City>
    <Zip>95662</Zip>
    <Ethnicity>1</Ethnicity>
    <HouseholdIncome>4</HouseholdIncome>
    <Age>2</Age>
    <Education>3</Education>
    <HealthInsurance>3</HealthInsurance>
    <PovertyLevel>3</PovertyLevel>
    <CrashDeath>1</CrashDeath>
    <Diabetes>2</Diabetes>
    <DiabeticScreening>2</DiabeticScreening>
    <ExcessiveDrinking>4</ExcessiveDrinking>
    <FastFood>3</FastFood>
    <FineParticulateMatter>3</FineParticulateMatter>
    <MammographyScreening>3</MammographyScreening>
    <Obesity>2</Obesity>
    <PhysicalInactivity>2</PhysicalInactivity>
    <PoorHealth>3</PoorHealth>
    <PrematureDeath>2</PrematureDeath>
    <RecreationalFacilities>3</RecreationalFacilities>
    <SexTransDis>4</SexTransDis>
    <Smoking>2</Smoking>
    <TeenBirths>3</TeenBirths>
    <Crime>4</Crime>
    <Unemployment>0</Unemployment>
    <Mortgage>5</Mortgage>
    <Election>1</Election>
    <HouseholdIncomeLocal>3</HouseholdIncomeLocal>
    <CreditRate>4</CreditRate>
  <Response>