Basic JS Integration

December 11, 2017


 
< Go Back

Ringba JavaScript Tags are for dynamic number insertion into your websites and landing page. These tags allow Ringba to track and aggregate information about your users and organize it for reporting.

The most important part of your configuration is making sure you have the correct campaign ID in your script tag. If you copy your implementation code out of your campaigns view, it will automatically be populated with the correct campaign ID. Otherwise, you can retrieve the correct ID for your campaign from the ‘View Campaigns’ menu, or by viewing the settings of any campaign.

Campaign IDs follow the same format:

Simple Integration

The easiest way to integrate the Ringba tracking code is to put the following script in the current location of your on-page phone number. Simply drop the script tag into your page where you’d like your phone number to appear, and style it using the existing HTML code.

For example, if your current HTML looks like:

Your new HTML would like:

h3>JQuery Integration

If the majority of your users use new browser technology, the jQuery implementation is most likely the best choice for your campaign.

To get started you will want to configure your website or landing page to have a specific class associated with the div, span, or other object where you want your phone number inserted. You can apply whatever CSS you prefer to the HTML class you would like to use so your phone numbers match the look and feel of your site.

For this example we will be using the class ‘phone-number‘ to identify the tags we’d like our number inserted into and will begin by implementing the correct HTML.

Now that we’ve configured the HTML object’s we’d like our phone numbers inserted into, we need to place the jQuery and Ringba JavaScript tags in your HTML.

Full Compatibility Integration

In many countries people are still using outdated technology and older versions of windows. In this example we use a backwards compatible implementation that will loop through and replace your numbers.

This implementation is designed for traffic that has high numbers of older versions of windows and browsers like Windows XP, Windows Vista, IE7, and IE8.

To get started you will want to configure your website or landing page to have a specific class associated with the div, span, or other object where you want your phone number inserted. You can apply whatever CSS you prefer to the HTML class you would like to use so your phone numbers match the look and feel of your site.

For this example we will be using the class ‘phone-number’ to identify the tags we’d like our number inserted into and will begin by implementing the correct HTML.

Now that we’ve configured the HTML object’s we’d like our phone numbers inserted into, we need to place the Ringba JavaScript tags.

It is important to note that the Ringba tag must be placed below 100% of your content that will receive inserted numbers or this code will not function properly.

Last Updated: December 11, 2017

Join Our Newsletter

Profitable marketing tactics, case studies, in-depth guides, and more. Enter your email address now.

Please make sure your email address has an '@' and '.'

close