Call Tracking and Dynamic Number Insertion (DNI)
Call Tracking tools include multiple features:
- Dynamic Number Insertion (DNI)
- Tracking Number Pool
- Patient Conversion Uploading (GoogleAds)
Dynamic Number Insertion
The idea of the Dynamiс Number Insertion is to swap phone numbers on the page based on the traffic source.
We have the JavaScript plugin which does DNI on client websites. To be able to use DNI feature the JS plugin should be integrated into the website with help of this link:
<script type="text/javascript" src="<https://cdn.redspotinteractive.com/call-tracking/bundle.js>" defer></script>
Also, there is DNI configuration which should be set up independently for every website. The code looks like this:
<script>
// configuration as a javascript object
var dni = {
clientId: 300, // id of Client in RSI
// phone number to be replaced (please keep formatting with dashes)
replacePhone: '802-216-0008',
// organic traffic configuration
organic: [
{ campaignId: 55092, source: ['google', 'bing', 'yahoo'] },
{ campaignId: 51543, source: ['tiktok', 'facebook', 'twitter'] },
{ campaignId: 54433, source: 'all' }
],
// utm traffic configuration (optional)
utm: [{
campaignId: 32112,
tags: { campaign: 'test', source: 'google', medium: 'cpc' }
}, {
campaignId: 32113,
tags: { campaign: 'test2' }
}, {
campaignId: 32114,
tags: { source: 'google' }
}, {
campaignId: 32115,
tags: { medium: 'cpc' }
}]
}
// expose as RSI_DNI variable to be available in RSI plugin
window.RSI_DNI = dni;
</script>
Configuration above allows to map traffic sources to campaigns which phone numbers should be used for a specific source.
You can configure the plugin to replace either one or multiple phone number on the page. For one phone use it like this:
<script>
// configuration as a javascript object
var dni = {
clientId: 300, // id of Client in RSI
// phone number to be replaced (please keep formatting with dashes)
replacePhone: '802-216-0008',
// other configuration goes here
}
// expose as RSI_DNI variable to be available in RSI plugin
window.RSI_DNI = dni;
</script>
OR if you want to use multiple phone numbers, you can pass a collection there:
<script>
// configuration as a javascript object
var dni = {
clientId: 300, // id of Client in RSI
// phone numbers to be replaced (please keep formatting with dashes)
replacePhone: ['802-216-0008', '802-216-0007'],
// other configuration goes here
}
// expose as RSI_DNI variable to be available in RSI plugin
window.RSI_DNI = dni;
</script>
Rest of configuration contains two collections:
- organic – here you can specify mapping for you organic traffic.E.g. if you want to swap website phone number to the phone from the RSI CampaignId 55092 when a visitor came from Google search, you should place the config like this:
organic: [ { campaignId: 55092, source: 'google' } }
You can use the same mapping for any other site you want to track like twitter, facebook – whatever. We also support any custom websites.
To have multiple settings, just add a new row like this:
organic: [ { campaignId: 55092, source: 'google' } { campaignId: 55093, source: 'bing' } }
Also, you can use the same phone number for multiple sources – just pass them as a collection for the source property:
organic: [ { campaignId: 55092, source: ['google', 'bing', 'yahoo'] }, }
IMPORTANT – sources should have domains only, but not the full address. So, you should use ‘google’ instead of ‘https://google.com’ or ‘google.com’
NOTE – there is a possibility to use a common configuration for all organic traffic sources like this:
organic: [ { campaignId: 55094, source: 'all' } ]
By specifying all, you tell our plugin to use phone number from RSI campaign 55094 for all organic sources. It means that when the User comes to the website by a link from another website – we will swap the phone.
- utm – allows to specify phone number to be used for a specific UTM tags combination.E.g. if you want to use phone number from RSI Campaign 55095 for all traffic coming with with:
- utm_campaign=test
- utm_source=google
- utm_medium=cpc
You should add the config like this:
utm: [{ campaignId: 55095, tags: { campaign: 'test', source: 'google', medium: 'cpc' } }]
This means when the User came with URL https://client-website.com?utm_campaign=test&utm_source=google&utm_medium=cpc they will see phone number from RSI Campaign 55095 as phone number on the website.
It’s possible to have more than one configuration – just add a new row like this:
utm: [{
campaignId: 55095,
tags: { campaign: 'test', source: 'google', medium: 'cpc' }
},{
campaignId: 55096,
tags: { campaign: 'test', source: 'facebook', medium: 'cpc' }
}]
You can add as many UTM mappings as you want.
NOTE – you are not restricted to use all three values in tags – campaign, source, medium. You can use campaign + source:
utm: [{
campaignId: 55097,
tags: { campaign: 'test', source: 'google' }
}]
OR just source + medium:
utm: [{
campaignId: 55098,
tags: { source: 'google', medium: 'cpc' }
}]
OR just campaign only:
utm: [{
campaignId: 55098,
tags: { campaign: 'test' }
}]
OR just source only:
utm: [{
campaignId: 55099',
tags: { source: 'google' }
}]
OR just medium only:
utm: [{
campaignId: 55060,
tags: { medium: 'cpc' }
}]
IMPORTANT – only 3 tags (utm_campaign, utm_source and utm_medium) will be considered – script doesn’t check utm_content or utm_term .
The script will update ALL phone numbers on a page will match with phone number in configuration.
RsiCampaignId URL parameter
The UTM configuration above is for the cases when the rsiCampaignId parameter is not passed. Otherwise, rsiCampaignId will override any UTM configuration, and DNI will be performed based on that rsiCampaignId .
If you only use rsiCampaignId for your campaigns – you don’t event need the UTM section.
RsiCampaignId is widely used for GoogleAds campaigns – we ask our clients to include the rsiCampaignId parameter for all GoogleAds campaigns.
The DNI logic is the same as described above – when rsiCampaignId is passed, the call tracking script will get a phone number for that campaign in RSI, and will use to change all number in UI.
Default PPC Campaign
Campaign in RSI can be marked as the default PPC campaign. It means that if the call tracking plugin wasn’t able to match a campaign based on UTM configuration for the PPC source traffic – RSI will use the default PPC campaign’s phone number.
NOTE – client can have only one default PPC campaign.
Default Campaign
The same for the PPC source, for organic traffic there is a default campaign which will be used for DNI if plugin wasn’t able to match appropriate campaign.
Tracking Number Pool
While individual campaigns within RSI may be assigned their own, dedicated phone number to be shown to all users, this is not always ideal. Specifically, in the case of being able to send custom offline conversions back up to Google Ads, you will need to capture the user’s gclid and match it up with the phone number being called. In this case, a tracking number pool will need to be created within RSI, and then applied to desired campaign.
NOTE – Google click ids (gclid) are used by GoogleAds. Gclid is generated for every click to google ad, and is passed via URL parameters. The id is also used to upload conversion back to google.
The tracking number pool contains a set of phone numbers which could be shared for RSI Campaigns in the call tracking.
Campaign can be configured to use a phone number from the pool, and in that case its phone number will be empty:
With above configured, the call tracking plugin will allocate a unique phone number for every website user, and will reserve it for 1hr before releasing it back into the tracking number pool for reallocation to another user.
Conversion Goals
One of the major ideas of the call tracking tools is to push patients conversion back to GoogleAds when leads reach a certain status. At the moment, we take into account three lead statuses:
- Scheduled
- Attended
- Purchased
To track conversion for the RSI call leads in GoogleAds account we need to have 3 conversion actions in client’s GoogleAds account:
- RSI Call Lead Scheduled
- RSI Call Lead Attended
- RSI Call Lead Purchased
Conversion source should be the “import from clicks”
With the call tracking plugin connected and conversion actions set up, all the flow should work properly.
Validation and Logs
To know if the script works correctly you can take a look at console log:
If there are any config validation errors you will see ones there.
Also, you will be able to see details around the replacement: