When you use a landing page to present a number to a prospective caller, you might want to send information from that page to Ringba as tags to use later for things like call routing or reporting. For example, you might ask the landing page visitor to complete a form and you want to send the values they typed into the fields into Ringba.
With a little additional code on your web page, you can make the prospective caller's answer available to Ringba when they call your number pool number.
Important: This solution builds on the number pools feature. If you are not already familiar with number pools, see Number Pools first to learn more.
This article contains the following sections:
- Passing Tags via Query String Parameters
- Passing Tags via JavaScript on Page Load
- Passing Tags via JavaScript after Page Load
- Where to See Your Tag Values in Ringba
- How to Use Your Tag Values
- Common Tags to Pass to Ringba
- Passing User Data from Your Landing Page into Ringba FAQ
Passing Tags via Query String Parameters
First, Ringba already automatically captures any tags you include as parameters in your URL. For example, consider the following URL:
https://example.com/purchase.htm?lang=us-en&state=NYThis URL passes its parameters to Ringba as tags:
- lang tag value is us-en
- state tag value is NY
You do not need to create any JavaScript code to pass information this way.
Passing Tags via JavaScript on Page Load
To send tag values to Ringba without any button clicks by the prospective caller, you need to insert this snippet into the <head> of your web page to initialize the rgba object. As shown below, you can include this snippet immediately after the regular number pool script:
<head>
<script src=//b-js.ringba.com/{campaign_id} async></script>
<script type="text/javascript">
window._rgba_tags = (window._rgba_tags || []);Notice that the first line that begins with <script> is the regular number pool snippet; be sure to replace {campaign_id] with the Ringba campaign ID. The second line that begins with <script> initializes the object you need.
To send tags values on page load, you continue with the following code in the <head> element:
window._rgba_tags.push({custom_id1:"custom_value1"});
</script>
</head>Passing Tags via JavaScript after Page Load
To send Ringba tag values from button clicks by the prospective caller, you need the same first snippet in the <head> of your web page as the last example. Just as before, it initializes the rgba object. You can include it immediately after the regular number pool script:
<head>
<script src=//b-js.ringba.com/{campaign_id} async></script>
<script type="text/javascript">
window._rgba_tags = (window._rgba_tags || []);Immediately after this code snippet, and still inside the <head> tag, you place the function that the page calls when the prospective caller clicks the button:
<script type="text/javascript">
function addTags() {
window._rgba_tags.push({custom_id2:"custom_value2"});
window._rgba_tags.push({clickID:"myvalue"}):
return;
}
</script>
</head>Within the <body> of the web page, you call the addTags function like this:
<button onclick="addTags();">Add Tags</button>Where to See Your Tag Values in Ringba
Ringba can use the tags you send for automations, such as routing calls based on the values. You can see the tags you collected on the call in the Call Details section of the Reporting screen. When you open a call, you can click the Tags tab to see the tags and the values.
How to Use Your Tag Values
Now that you have caller information in Ringba, you can use it immediately in a variety of ways:
- Create a URL parameter for the tag and use it with tag routing filters to choose the best target to receive the call. See Using URL Parameters as Tag Routing Filters for step-by-step instructions.
- Filter your Reporting by tag value to identify your most lucrative customers.
Common Tags to Pass to Ringba
The following list contains tags Ringba captures automatically from the landing page using the number pool. You can also send custom data beyond the items in this list.
- UTM parameters from the landing page URL
- utm_source
- utm_medium
- utm_campaign
- utm_term
- utm_content
- Display info
- Width
- Height
- Avail Width
- Avail Height
- Pixel Depth
- Color Depth
- Referrer
- URL info
- Complete URL
- Clean URL
- Host Name
- Path Name
- Hash
- Geo location
- Country
- Country Code
- Sub Division
- Sub Division Code
- City
- ZIP Code
- Latitude
- Longitude
- Browser info and IP address
- User Agent String
- Browser
- Browser Version
- IP Address
- Connection Info
- ISP
- Organization name
- Autonomous Name
- Autonomous System Number
- Request Info
- Referrer page
- Landing page URL
- Publisher
- Replacement number
- Company
- Name
- ID
- Sub ID
Passing User Data from Your Landing Page into Ringba FAQ
What should I do if I need help with my campaigns?
If you have any questions or need additional help, please reach out to our support team via chat or email at support@ringba.com.