Azalead Account based Website Personalization

Last Updated: Aug 2, 2016 02:52PM CET

Leading B2B companies use this API to increase website engagement, conversion rates and overall marketing ROI. This API is powered by Azalead patent pending Company ID technology and will personalize your website even for unregistered and anonymous visitors.

 

How it works

The Azalead website tag provides a JSON string. This string describes the name and firmographics of your company visitors. It contains several personalization data fields including:
  • Company Name
  • National ID
  • NACE code
  • Size
  • Legal Form
  • Industry
  • Employees
  • Website
  • City
  • Country
  • Country code
  • Zip Code
What does this variable look like?
{
    "companyName": "TOTAL S.A.",
    "nationalId": "542051180",
    "naceCode": "0610",
    "size": "Very large company",
    "legalForm": "SA",
    "industry": "Oil & Gas",
    "employee": "100307",
    "website": "www.total.com",
    "city": "COURBEVOIE",
    "country": "France",
    "countryCode": "FR",
    "postCode": "92400" 
  } 

Getting website visitor data

Before using the Azalead Website Personalization API you will need to open an Azalead account. If you do not yet have an account, you can sign up here for a free trial account.

After opening an account, you will receive your unique Azalead tracker code to paste on your website. Either place the tag at the end of the <body> section of your html pages or use one of our CMS plugins (Wordpress, Joomla, Drupal).

Once the Azalead tag is on your website, you will be able to capture the visiting company data to personalize content anywhere in the <body> of your website pages. The process is straightforward. When the variable is loaded, the tag fires a javascript event "azaCompanyVisitorLoaded". So you just need to listen to the "azaCompanyVisitorLoaded" event. When this event is fired you can access the "aza_company_visitor" variable and get the Company details you need to personalize your content.

Here is a sample of website personalization Company data in the Azalead tag

var aza_company_visitor = '{ "companyName": "TOTAL S.A.", "nationalId": "542051180",
"naceCode": "0610", "size": "Very large company","legalForm": "SA",
"industry": "Oil & Gas", "employee": "100307", "website": "www.total.com",
"city": "COURBEVOIE", "country": "France", "countryCode": "FR", "postCode": "92400" }'
; if (/(MSIE|Trident\/|Edge\/)/i.test(navigator.userAgent)) { var e = document.createEvent("Event"); e.initEvent("azaCompanyVisitorLoaded", !0, !0), document.dispatchEvent(e) } else document.dispatchEvent(new Event("azaCompanyVisitorLoaded"));

 

After placing the Azalead tag on your website you can implement one or a combination of the 3 cases below.

 

Case 1 - Company name personalization

Personalize your welcome messages with the company name of your website visitors.


Code samples

<html>
   <head>
      <title>Azalead Company Visitor Company Name Sample</title>
      <style>
body {
       font-family: Calibri,Helvetica,Arial,sans-serif;
       margin: 20px;
}
#companyvisitorname{
  background-color: #f7ce46;
  color: #FFFFFF;
  font-size: 14px;
  text-align: center;
  padding: 10px;
  width: 200px;
  margin: 20px 0px;
}
      </style>
   </head> 
   <body>
      <div id="companyvisitorname">Company Visitor</div>
      <script type="text/javascript">
document.addEventListener('azaCompanyVisitorLoaded', function (e) {
  // get Azalead company visitor data
  if (typeof aza_company_visitor !== "undefined") {
    var yourCompanyVisitor = JSON.parse(aza_company_visitor);
    
    // company visitor name
    if (yourCompanyVisitor != null && yourCompanyVisitor.companyName != null) {
      document.getElementById("companyvisitorname").innerHTML = 
        yourCompanyVisitor.companyName + '<br/>join our breakfast<br/>next Thusday';
    }
  } 
}, false);
      </script> 
      <!-- script to remove and to replace with your Azalead Tag -->
      <!-- aza_company_visitor mock object for tests -->
      <script src="http://images.azalead.com/developer/js/aza_website_visitor.js"></script>
      <!-- script to remove and to replace with your Azalead Tag -->   
   </body>
</html>
<html>
   <head>
      <title>Azalead Company Visitor Company Name Sample</title>
      <style>
body {
       font-family: Calibri,Helvetica,Arial,sans-serif;
       margin: 20px;
}
#companyvisitorname{
  background-color: #f7ce46;
  color: #FFFFFF;
  font-size: 14px;
  text-align: center;
  padding: 10px;
  width: 200px;
  margin: 20px 0px;
}
      </style>
      <script type="text/javascript" 
         src="http://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> 
   </head>
   <body>
      <div id="companyvisitorname">Company Visitor</div>
      <script type="text/javascript">
$(document).on('azaCompanyVisitorLoaded', function(){
    // get Azalead company visitor data
    if (typeof aza_company_visitor !== "undefined") {
      var yourCompanyVisitor = $.parseJSON(aza_company_visitor);
      // company visitor name
      if (yourCompanyVisitor != null && yourCompanyVisitor.companyName != null) {
        $("#companyvisitorname").html(yourCompanyVisitor.companyName + '<br/>join our breakfast<br/>next Thusday');
      }
    } 
});
      </script>
      <!-- script to remove and to replace with your Azalead Tag -->
      <!-- aza_company_visitor mock object for tests -->
      <script src="http://images.azalead.com/developer/js/aza_website_visitor.js"></script>
      <!-- script to remove and to replace with your Azalead Tag -->  
   </body>
</html>

 

Case 2 - Company size personalization

Display different content depending on visiting company size.


Code samples

<html>
   <head>
      <title>Azalead Company Visitor Company Size Sample</title>
      <style>
body {
       font-family: Calibri,Helvetica,Arial,sans-serif;
       margin: 20px;
}
#message{
  background-color: #f7ce46;
  color: #FFFFFF;
  font-size: 14px;
  text-align: center;
  padding: 10px;
  width: 200px;
  margin: 20px 0px;
}
      </style>
   </head> 
   <body>
      <div id="message">Company Visitor</div>
      <script type="text/javascript">
document.addEventListener('azaCompanyVisitorLoaded', function (e) {
  // get Azalead company visitor data
  if (typeof aza_company_visitor !== "undefined") {
    var yourCompanyVisitor = JSON.parse(aza_company_visitor);
    
    // change message within number of employees
    if (yourCompanyVisitor != null && yourCompanyVisitor.employee != null) {
      if (yourCompanyVisitor.employee > 100) {
        document.getElementById("message").innerHTML = 
          'ENTERPRISE COMPANIES<br/>Connected to global consumers';
      } else {
        document.getElementById("message").innerHTML = 
          'MID MARKET<br/>Offers adapted to your business';
      }
    }
  } 
}, false);
      </script> 
      <!-- script to remove and to replace with your Azalead Tag -->
      <!-- aza_company_visitor mock object for tests -->
      <script src="http://images.azalead.com/developer/js/aza_website_visitor.js"></script>
      <!-- script to remove and to replace with your Azalead Tag -->
   </body>
</html>
<html>
   <head>
      <title>Azalead Company Visitor Company Size Sample</title>
      <style>
body {
       font-family: Calibri,Helvetica,Arial,sans-serif;
       margin: 20px;
}
#message{
  background-color: #f7ce46;
  color: #FFFFFF;
  font-size: 14px;
  text-align: center;
  padding: 10px;
  width: 200px;
  margin: 20px 0px;
}
      </style>
      <script type="text/javascript" 
         src="http://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
   </head>
   <body>
      <div id="message">Company Visitor</div>
      <script type="text/javascript">
$(document).on('azaCompanyVisitorLoaded', function(){
    // get Azalead company visitor data
    if (typeof aza_company_visitor !== "undefined") {
      var yourCompanyVisitor = $.parseJSON(aza_company_visitor);

      // change message within number of employees
      if (yourCompanyVisitor != null && yourCompanyVisitor.employee != null) {
        if (yourCompanyVisitor.employee > 100) {
          $("#message").html('ENTERPRISE COMPANIES<br/>Connected to global consumers');
        } else {
          $("#message").html('MID MARKET<br/>Offers adapted to your business');
        }
      }
    } 
});
      </script> 
      <!-- script to remove and to replace with your Azalead Tag -->
      <!-- aza_company_visitor mock object for tests -->
      <script src="http://images.azalead.com/developer/js/aza_website_visitor.js"></script>
      <!-- script to remove and to replace with your Azalead Tag -->  
   </body>
</html>

 

Case 3 - Company industry personalization

Display different content depending on visiting company industry vertical.

For best results with Company industry personalization, we recommend using the NACE code. You can find the full NACE code list here.


Code samples

<html>
   <head>
      <title>Azalead Company Visitor Industry Sample</title>
      <style>
body {
       font-family: Calibri,Helvetica,Arial,sans-serif;
       margin: 20px;
}
#message{
  background-color: #f7ce46;
  color: #FFFFFF;
  font-size: 14px;
  text-align: center;
  padding: 10px;
  width: 200px;
  margin: 20px 0px;
}
      </style>
   </head> 
   <body>
      <div id="message">NEW ERA OF INNOVATION<br/>State of the art</div>
      <script type="text/javascript">
document.addEventListener('azaCompanyVisitorLoaded', function (e) {
  // get Azalead company visitor data
  if (typeof aza_company_visitor !== "undefined") {
    var yourCompanyVisitor = JSON.parse(aza_company_visitor);

    // change message within company NACE code
    if (yourCompanyVisitor != null && yourCompanyVisitor.naceCode != null) {
      if (yourCompanyVisitor.naceCode.indexOf("47") == 0) {
        // 47 - Retail trade, except of motor vehicles and motorcycles
        document.getElementById("message").innerHTML = 
          'RETAIL ADVANTAGES<br/>Meeting high volume demands';
     } else if (yourCompanyVisitor.naceCode.indexOf("58") == 0) {
      // 58 - Publishing activities
      document.getElementById("message").innerHTML = 
            'REALTIME PUBLISHING<br/>Adapt to your business';
     }  else if ((yourCompanyVisitor.naceCode.indexOf("64") == 0) || (yourCompanyVisitor.naceCode.indexOf("66") == 0)) {
      // 64 - Financial service activities, except insurance and pension funding
      // 66 - Activities auxiliary to financial services and insurance activities
      document.getElementById("message").innerHTML = 
            'FINANCIAL MANAGEMENT<br/>Data for your investments';
     } else if (yourCompanyVisitor.naceCode === "0610") {
      // 0610 - Extraction of crude petroleum
      document.getElementById("message").innerHTML = 
            'OIL AND GAS<br/>Data for your analysis';
     }
    }
  } 
}, false);
      </script> 
      <!-- script to remove and to replace with your Azalead Tag -->
      <!-- aza_company_visitor mock object for tests -->
      <script src="http://images.azalead.com/developer/js/aza_website_visitor.js"></script>
      <!-- script to remove and to replace with your Azalead Tag -->
   </body>
</html>
<html>
   <head>
      <title>Azalead Company Visitor Industry Sample</title>
      <style>
body {
       font-family: Calibri,Helvetica,Arial,sans-serif;
       margin: 20px;
}
#message{
  background-color: #f7ce46;
  color: #FFFFFF;
  font-size: 14px;
  text-align: center;
  padding: 10px;
  width: 200px;
  margin: 20px 0px;
}
      </style>
      <script type="text/javascript" 
         src="http://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
   </head>
   <body>
      <div id="message">Company Visitor</div> 
      <script type="text/javascript">
$(document).on('azaCompanyVisitorLoaded', function(){
    // get Azalead company visitor data
    if (typeof aza_company_visitor !== "undefined") {
      var yourCompanyVisitor = $.parseJSON(aza_company_visitor);

      // change message within company NACE code
      if (yourCompanyVisitor != null && yourCompanyVisitor.naceCode != null) {
        if (yourCompanyVisitor.naceCode.indexOf("47") == 0) {
            // 47 - Retail trade, except of motor vehicles and motorcycles
            $("#message").html('RETAIL ADVANTAGES<br/>Meeting high volume demands');
        } else if (yourCompanyVisitor.naceCode.indexOf("58") == 0) {
            // 58 - Publishing activities
            $("#message").html('REALTIME PUBLISHING<br/>Adapt to your business');
        }  else if ((yourCompanyVisitor.naceCode.indexOf("64") == 0) 
                || (yourCompanyVisitor.naceCode.indexOf("66") == 0)) {
            // 64 - Financial service activities, except insurance and pension funding
            // 66 - Activities auxiliary to financial services and insurance activities
            $("#message").html('FINANCIAL MANAGEMENT<br/>Data for your investments');
        } else if (yourCompanyVisitor.naceCode === "0610") {
            // 0610 - Extraction of crude petroleum
            $("#message").html('OIL AND GAS<br/>Data for your analysis');
        }  else {
            $("#message").html('NEW ERA OF INNOVATION<br/>State of the art');
        }
      }
    } 
});
      </script>   
      
      <!-- script to remove and to replace with your Azalead Tag -->
      <!-- aza_company_visitor mock object for tests -->
      <script src="http://images.azalead.com/developer/js/aza_website_visitor.js"></script>
      <!-- script to remove and to replace with your Azalead Tag -->   
   </body>
</html>