This article contains information on advanced options for displaying your number pool number on your landing page. The methods in this article require coding skill.
The basic procedure explained in the Number Pools article is the best solution for almost everyone. If you are adding a number pool number to a landing page for the first time, you should try the basic procedure in the Number Pools article first. Only use the procedures in this article only if the basic option can't support your goals AND you have access to the coding skills to implement the advanced options.
In rare cases, a second JavaScript option, available through the Install Call Tracking Tag window on the Campaigns screen, might work better for your use case. Ringba also offers an API you can use to retrieve your number pool number.
This article contains the following sections:
Install Call Tracking Tag window, Option 2
When you reach Step 4 of the procedure in the Number Pools article, you open the Install Call Tracking Tag window. In that procedure, you click Option 1 to access the JavaScript snippet to add to your landing page <HEAD> element. This snippet references a script hosted on ringba.com that replaces all instances of your Number to Replace with a number from your number pool.
However, you can also click Option 2.
Option 2 presents a similar script that injects a number pool number exactly where you run the script. If you include your number pool number only one time on your landing page, this can be a straightforward solution. If you use this option, the script formats the number it injects according to the pattern you set in the Number Format field on the campaign.
However, you should not include this script more than once on the page. If you want the number to appear more than once, you must run the snippet and save the result as a variable. Then you can use the variable multiple times through the web page and format it as you prefer.
Even if you are using the API to inject number pool numbers into your landing page, the Install Call Tracking Tag window can still be helpful to you. This is the easiest place to find the ringba_com_tag value, which you need for your API requests.
Finding the ringba_com_tag value
Use these steps to access the ringba_com_tag value:
- Click Campaigns in the left navigation menu to open the list of campaigns in your account.
- Find the campaign you want and click the name to open it.
- Scroll down to the Call Tracking Tags section.
Note: The campaign must have a call tracking tag to proceed. If the campaign doesn't have one yet, use the steps in the Number Pools article to add one. - Click the <> icon that appears in the Actions column for the call tracking tag you want to use.
The Install Call Tracking Tag window appears. - Click Option 2 to show the script.
- Find the var ringba_com_tag statement. It contains the value you need.
- Copy the value that appears in quotation marks and use it in your API code. For example, the code value looks similar to the following:
JS9622f7af050b48d99999x9xx9ssssss9
Number Pool Number API
You can also use the Ringba API to place a number from your number pool on your landing page. Note that when you use the API instead of the JavaScript snippets, you must format the phone number as part of your own code. The API does not automatically apply any number formatting.
Tip: You can retrieve the JsTagId value from the Install Call Tracking Tag window as described in the previous section.
Method POST
URL: https://display.ringba.com/v2/nis/gn/
HEADERS
Content-Type: application/json
BODY
{
JsTagId: "JS9622f7af050b48d99999x9xx9ssssss9",
CurrentEpoch: 1556308127,
Tags: [{
"type": "User",
"YourTag": "Value1"
},
{
"type": "User",
"TagName2": "Value2"
}
]
}
You receive a response similar to the following:
Tip: The expireMs and heartBeatMs values come from the number pool settings.
{
"id": "PV15554225074",
"displayNumber": "15554225074",
"phoneNumber": "+15554225074",
"phoneNumberLocal": null,
"impressionQueryPath":
"DRvtd%2fnV%2bSzGI1wSpZgNwsUoULDpr2DbHHl1Xl3CzEnpWsfWr3jFF8R7ytuplSELK
sChAx6yZ9v9V624rINLzIag3XtEPd4knH5YbKmYM13P%2b1bd2Fv8yg%3d%3d",
"maxEpoch": 1556338127,
"expireMs": 30000,
"heartBeatMs": 5000,
"displayFmt": "+1nnnnnnnnnn"
}
When a call comes in, the tags you set appear in the call details.
Important: If you rely on the geolocation tag values, make sure you make your API request from the client. The geolocation tags are captured for the client that is making the API request, so if you make the API request from the client, the tag information will be correct. If you instead make the API request from the server, the geolocation tag values will be incorrect.
Advanced Number Pools FAQ
How do I change the format of the number pool number on my landing page?
- If you chose Option 2 on the Install Call Tracking Tag window (the procedure described in this article), you can change the format of the number pool number by updating the Number Format field on the campaign settings.
- If you chose to use the API to insert the number (also described in this article), you can change the format as part of your API code.
- If you chose Option 1 on the Install Call Tracking Tag window (the procedure described in the Number Pools article), you can change the format of the number pool number by changing the format of the number being replaced on the landing page. See the Number Pools article for more information.