AVANSER Dynamic Number Configuration

Website preparation

This guide will show you how to implement online call tracking for your website.

Please ensure Google Analytics code is installed throughout your website. If you are using platforms other than Google Analytics, additional configuration will be required. Contact your account manager to learn more.

Step 1

Copy and paste the following JavaScript code just before the closing head tag (or </head>) making sure it is after the Google Analytics script. This ensures that the script fires on all pages after the analytics code on the website. Or, if placing the JavaScript within the body tag, make sure it is placed on each page of the site after the Google Analytics script.

 
Copy Copied
<!-- AVANSER Call Tracking [start] -->						
<script type="text/javascript">
window['AvanserOptions'] = { clientId : 5065 , trackingCode : 1 }; 
(function() {
	var av = document.createElement('script');
	av.type = 'text/javascript';
	av.id = 'AVANSERjs';
	av.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 
		'adriano-sg.avanser.com/aa.js?t=' + (new Date().getTime());
	var h = document.getElementsByTagName('head')[0];
	h.parentNode.appendChild(av);
})();
</script>
<!-- AVANSER Call Tracking [stop] -->						
 

Step 2

Define the following span class and add the below span tags around the respective numbers you want tracked and dynamically changed.

If you have a href link for your phone number, please include it within our span (or div) tag as we will dynamically change everything within the tag and return a href link with our new tracking number.

 

Tracking Code: 1 (SG Test)

<span class="AVANSERnumber">your default website number</span>

 

Implementation Examples

You can add the AVANSERnumber class (provided above in Step 2) to your website either through a <span> or <div> tag around all numbers you want to dynamically track.

As the placement of these tags will vary from site to site, below you will find a number of examples which can be used as a guide to implementation on your own site:

 

Example 1 - Plain text numbers

To dynamically replace a phone number in the body text:

Call 1300 111 222 for a quote.

Should be:

Call <span class="AVANSERnumber">1300 111 222</span> for a quote.

 
 

Example 2 - Clickable (linked) numbers

To dynamically replace a clickable phone number:

Call <a href="tel:1300111222">1300 111 222</a> for a quote.

Should be:

Call <span class="AVANSERnumber"><a href="tel:1300111222">1300 111 222</a></span> for a quote.

 
 

Example 3 - Numbers with existing tagging

If you were adding the class to your header phone number as below:

<div class="phone-number">(07) 3823 6888</div>

You can just add the AVANSERnumber class to the existing class tag:

<div class="phone-number AVANSERnumber">(07) 3823 6888</div>

 
 

Example 4 - Numbers contained within images

To replace an image containing the phone number, the images with updated tracking numbers need to be provided prior to implementation.

<img src="images/AVANSER-example.png" alt="AVANSER example" >

Should be:

<span class="AVANSERnumber">
	<img src="images/AVANSER-example.png" alt="AVANSER example" >
</span>

 

3rd Party Integrations

Below our Knowledge Base articles that will help integrate Dynamic Numbers with any supported 3rd Party Integration

You'll find more information in our Integrations Knowledge Base.

If you have any questions or require any further assistance in installing AVANSER's dynamic code, please contact our support team on 6664 8188 or email support@avanser.com.sg.