Insert.js

URL Parameter Sniffing

Retreaver can pick anything up from the URL, but you need to tell it what to look for, and what it’s called in the system. For example, you don’t want anyone to know who drives your traffic, so you would sniff for a to resolve the affiliate_id.

Sniffing
The Dynamic Number Insertion section on your Campaign screen.

Tracking keywords becomes easy when you can just send it to us in the URL. We can then sniff for them and filter calls to your buyers using these fields.

We recommend these articles to help understand how Retreaver functions: Learn what Tags are, then learn about how a call gets Tagged, then learn how to filter calls to your Buyers with these Tags.

Retreaver.js

An alternative to Insert.js is our more robust Retreaver.js is our JavaScript library for displaying trackable phone numbers, it offers a flexible API so developers can interact with our services in a way that is both straightforward and compliant with modern standards. It is able to be cached by the visitors browser, and quickly distributed via a CDN.

More info on Retreaver.js

If you run low volume traffic and do not require alerts, this guide on our much simpler Insert.js will fulfill your needs.


Insert.js

Our script without &message= will only show the number and not hyperlink it. To hyperlink, you just take what would be the JavaScript to hyperlink a number, image, text, or a button and put that in the &message={URL Encoded JavaScript}.
We then replace the JavaScript call to us with the formatted JavaScript you put in &message=.

No Hyperlink

(Do not include &message= in the script)

src=”https://api.rtvrapi.com/insert.js?key={Insert Campaign Key Here}&default_number=%2B{Insert Phone with Country Code Here}” type=”text/javascript”></script>

Hyperlinking an Image, Text, Phone Number, or Button

(Setting &message= for different functionality)

Image: <a href=”tel:+1[plain_number]”><img src=”{Path To Image}”></a>

Text: <a href=”tel:+1[plain_number]”>{Text To Be Hyperlinked}</a>

Formatted Number: <a href=”tel:+1[plain_number]”>[number]</a>

Button: The hyperlink part will look like <a href=tel:+1[plain_number] class=”button”>, then the rest of the format for Image, Text, or Formatted Number.
You will take from <a to </a> and URL Encode it, and that is what the &message= is set to.

We find this tool helpful in encoding and decoding URLs: http://meyerweb.com/eric/tools/dencoder/

Click Here For Hyperlink Code Examples

Final Script

<script src=”https://api.rtvrapi.com/insert.js?key={Insert Campaign Key Here}&default_number=%2B{Insert Default Phone With Country Code Here}&message={URL Encoded HyperLink Javascript Code}” type=”text/javascript”></script>

 

Angela Dougherty

Client Success Officer