Skip to content
Aashish Joshi edited this page Aug 27, 2022 · 1 revision

Welcome to the phnum-js wiki!

This is an open source library to help you show the best number to visitors on your website.

What does this library do?

If you have phone numbers from multiple countries, you can use this library to show the number that is in the country of the website visitor. Additionally, the phone number is formatted in the visitor's local format (using the robust libphonenumber project) and is displayed as a tel: link.

How can I use it on my website?

There are two ways you can use the script.

  1. Directly - Download the file showBestNumber.min.js and add it to your website files. Now, just add a <script> tag with the path to this file in the <head> of all pages where the number should be displayed.

  2. CDN* - Use the CDN link in the script tag.

<script src="/path/to/showBestNumber.min.js" async></script>
Clone this wiki locally