The cookies used by CallRail's Dynamic Number Insertion are considered "strictly necessary" rather than marketing/analytical cookies. According to current global privacy regulations, "strictly necessary" cookies do not require consent to be used on a website. When customers use CallRail services on their website, it is their responsibility to notify all website visitors of the use of cookies.
A common way to inform visitors about website cookies is to deploy a cookie consent banner on your website. Here are some suggestions on setting up this banner. You or your website developer will need to build and set up the cookie consent banner on your website. We do not configure the banner on our end. There are also tools such as OneTrust that can assist with this.
Please note: While a cookie consent banner is usually sufficient, we always recommend that you confirm the required steps with your legal counsel, as regulations may vary depending on your business locations or service areas.
Method 1: Google Tag Manager (Recommended)
If the website uses Google Tag Manager (GTM) to deploy CallRail, you can tie the CallRail tag to the consent banner. Google works with a number of partners to set up and deploy these banners, with a variety of price points and required technical expertise. Please take time to review the available partners before continuing.
- Create the consent banner using your desired platform.
- Integrate it with GTM. This step will vary depending on the banner platform used.
- Locate the CallRail tag inside GTM.
- Change the trigger from "All Pages" (which fires immediately) to a custom trigger provided by the banner software (e.g., cookie_consent_granted).
- Under the CallRail tag's Advanced Settings > Consent Settings, you can require a specific consent type (such as analytics_storage) before the tag fires.
Method 2: Direct HTML Script Modification
If the CallRail script is hardcoded directly into the website's header or footer, you will need to modify the JavaScript snippet itself.
- Find the standard CallRail snippet on the website.
- Replace the snippet with the code shown below. In this code, you will see a line called el.src. You will need to replace the URL in this line with the one in your script tag.
<script>
function enableswap() {
const el = document.createElement('script');
el.type = 'text/javascript';
el.src = "//cdn.callrail.com/companies/YOUR_ID/YOUR_ID/swap.js";
document.body.appendChild(el);
}
</script>
<button onclick="enableswap()">I consent to cookies and tracking</button>This code will display a consent banner. Once the user clicks "Accept" on the banner, the CMP software dynamically changes the script back to text/JavaScript, the script fires, and the phone number swaps.
Verifying the Setup
Once you complete the above steps, you can verify it is working by doing the following:
- Open the website in an "Incognito" or "Private" browsing window.
- Look at the phone number. It should not swap to the CallRail tracking number.
- Click the "Accept" button on the cookie banner.
The page should update, the CallRail script will fire, and the number will be swapped immediately.
Going forward, when a visitor lands on your site, our script will wait. The phone number will not swap. If the visitor clicks to accept/consent on your banner, the script will fire, and the number will swap.
If you have other questions, please reach out to privacy@callrail.com.