-
-
Save paulleduc/3e60cf1ea47f016181b1 to your computer and use it in GitHub Desktop.
Unbounce Ringpool JavaScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" src="http://ringpools.ringpartner.com/ringpartner_unbounce_ringpools.js"></script> | |
<script type="text/javascript"> | |
/* | |
RingPartner Unbounce Ringpool JavaScript Instructions: | |
STEP 1: | |
Add this script to your Unbounce page using the 'Add New Javascript' button under | |
'Javascripts'. | |
STEP 2: | |
Add your API URL(s) below where specified, adding {tokens} to the tracking variables | |
that correspond to variables in the URL of your Unbounce page. | |
STEP 3: | |
Add your keyword defaults where specified, including the default phone number in case | |
the API URL fails. This script also functions as a keyword insertion script, meaning | |
you can insert values from the page URL into the page and display it to users. You may | |
also specify defaults for those keywords if they are not present in the page URL. | |
STEP 4 (OPTIONAL): | |
If your API URL is bulk ringpool (PNAPI) enabled, you can enable it below. If you are | |
unsure, skip this step. Most API URL's are not PNAPI enabled. | |
STEP 5: | |
When editing your page in Unbounce, use the token {number} anywhere (in text, buttons, | |
links, even in link URL's) you want your Ringpool phone number to appear. You can also | |
use other {tokens} for keyword insertion. | |
*/ | |
rpRingpool.init({ | |
apiUrls: [ | |
// put your API URL(s) here with any parameters you want to pass through. You can use | |
// {tokens} to pass in parameters from the current address. | |
// You can use as many API URL's as you'd like, simply copy the line below to add more. | |
// Ensure that each URL is enclosed in double quotes and followed by a comma unless | |
// it's the last or only url. | |
"https://ringpartner.ringrevenue.com/api/2014-11-01/ring_pools/44644/allocate_number.xml?ring_pool_key=3M7Rycqn63qlLHjFgqEnlmjuSBdrOY7h&Test={Test}" | |
], | |
keywordDefaults: { | |
// put your default keyword values here. they should be in the following format, | |
// note that there should be no trailing comma on the last or only line: | |
// number: "555-555-5555", | |
// keyword: "Hello World" | |
number: "555-555-5555" | |
}, | |
// if your API URL is bulk ringpool (PNAPI) enabled, change the following value to true. | |
pnapi: false | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment