Tired of not knowing which marketing campaigns are actually driving calls? Dynamic number insertion (DNI) is the answer—it swaps out phone numbers on your site based on how a visitor got there, so you can finally track what's working. If you’re using Callroot, setting up DNI isn’t rocket science, but there are a few pitfalls to avoid. This guide is for marketers, agencies, or frankly, anyone who needs call tracking to just work—without the usual mess.
Let’s walk through how to set up Callroot’s dynamic number insertion on your website, step by step. I’ll point out what’s worth sweating, and what’s not.
What You Need Before You Start
Before diving in, make sure you’ve got these sorted:
- A Callroot account (obviously). If you don’t have one, sign up here.
- Access to your website—you’ll need to add some code.
- A list of phone numbers you want to track (for different sources, like Google Ads vs. organic search).
- A very basic understanding of your website’s structure—where phone numbers show up.
If you’re missing any of these, you’ll hit a wall. Pause here and get those in order.
Step 1: Get Your Callroot Tracking Numbers
Dynamic number insertion works by swapping out phone numbers depending on where your visitors come from. That means you’ll need to buy or port in tracking numbers for each source you care about.
How to Do It
- Log in to Callroot.
- Go to the “Numbers” section.
- Click “Buy Number.”
- Pick the area code and country that matches your business (or your customers).
- Assign each number to a specific traffic source (e.g., Google Ads, Facebook, Organic).
- Name each number something obvious, like “Google Ads - Main Site.”
Pro tip: Don’t go overboard. Start with the sources that matter most. You can always add more numbers later if you see real differences in call volume.
Step 2: Set Up a Tracking Source (or “Campaign”) in Callroot
A “source” in Callroot is just their way of saying “which marketing channel or campaign sends this traffic?”
How to Do It
- Go to the “Sources” or “Campaigns” tab (the name changes sometimes—Callroot’s UI isn’t always the clearest).
- Click “Create New Source.”
- Name it after the channel you’re tracking—“Google Ads,” “Facebook Paid,” “Organic Search,” etc.
- Assign the appropriate tracking number(s) you bought earlier.
- Set the matching rules: usually, you’ll use UTM parameters (e.g.,
utm_source=google
) or referrer URLs.
What actually matters:
Set up your rules as simply as possible. If you overcomplicate things—trying to track every little sub-campaign—you’ll just make troubleshooting harder. Only set up what you’ll actually use.
Step 3: Configure Dynamic Number Insertion
Now for the “dynamic” part. This is where Callroot’s script replaces your website’s phone number with the right tracking number, depending on the visitor.
How to Do It
- In Callroot, look for something like “Dynamic Number Insertion” or “DNI Script.”
- Click to generate your unique JavaScript snippet.
- Decide:
- Site-wide replacement: Do you want every phone number on your site swapped, or just in certain places?
-
Match by CSS selector: You’ll tell Callroot which phone number(s) to replace, usually by specifying a class or ID. For example, if your number sits in
<span class="phone-number">
, you’ll use.phone-number
as the selector. -
Set any advanced options, like fallback numbers (what shows up if Callroot can’t match a visitor to a campaign).
Heads up:
If your site’s built with a page builder, or your numbers are embedded in weird ways (like images), the script might not catch everything. Always check your live site after installing.
Step 4: Add the Script to Your Website
No code, no tracking. Here’s how to actually get the DNI working.
How to Do It
- Copy the JavaScript snippet from Callroot.
- Paste it above the closing
</head>
tag on every page where your number appears. - On WordPress? Use your theme settings or a plugin like “Insert Headers and Footers”.
- On Shopify? Go to “Edit Code” and drop it into your theme.liquid file.
- On a static site? Just open up your HTML files and paste.
- Publish and clear your site cache if you use one.
What to ignore:
Don’t bother with “asynchronous loading” or “script minification” unless you know what you’re doing. The script is tiny and won’t slow down your site in any meaningful way.
Step 5: Test Everything (Seriously, Don’t Skip This)
This is where most tracking setups fall apart. If you don’t test, you’ll have no idea if it’s working—or worse, you’ll miss calls.
How to Do It
- Open your site in a fresh incognito window.
- Simulate each traffic source:
- For Google Ads, add
?utm_source=google&utm_medium=cpc
to your URL. - For organic, just open your homepage.
- For Facebook, use
?utm_source=facebook
. - Check: Does the phone number on your site swap for each source?
- Try calling each number to see if calls show up in Callroot.
If the number doesn’t change:
- Double-check your CSS selector in the script settings.
- Make sure the script is actually loading (use browser dev tools).
- Confirm your matching rules aren’t too narrow.
Pro tip: Keep it simple. If you can’t get the number to swap, strip back your rules until it works—then layer complexity back in.
Step 6: Set Up Call Routing and Notifications (Optional but Useful)
You probably want calls to actually reach someone. Callroot lets you route calls to different lines, set up call whisper, and get notified.
How to Do It
- In the Callroot dashboard, go to your tracking numbers.
- Set the destination number(s)—where calls get forwarded.
- Optionally, set up call recording, voicemail, or notifications (email/text).
Don’t get lost in the weeds:
Features like “call whisper” or detailed IVRs sound cool, but start simple. All you really need at first is calls actually going to the right place.
Step 7: Pull Reports and Actually Use the Data
This is the part most people ignore. The whole point of DNI is to see which traffic sources are making the phone ring.
How to Do It
- Head to the “Reports” or “Analytics” area in Callroot.
- Filter by source, number, or timeframe.
- Look for trends: Which campaigns drive calls? Do some numbers never ring?
- Adjust your marketing spend or focus based on real data—not just gut feeling.
Be skeptical:
Call tracking isn’t perfect. If a number never gets calls, double-check your setup before cutting the campaign. Sometimes it’s just a technical hiccup, not a failed channel.
What Works, What Doesn’t, and What to Ignore
- Works: Tracking calls by source is straightforward once you get the hang of Callroot’s UI. The dynamic insertion is fast and reliable.
- Doesn’t: Overcomplicating your setup. Too many numbers or wild matching rules just create chaos.
- Ignore: Fancy features until you have the basics working. No one ever lost a client because they didn’t use “call whisper.”
Troubleshooting: Common Issues
- Numbers not swapping: Usually a selector or script placement issue.
- Calls not recording/tracking: Make sure forwarding is set up and your account is funded.
- Weird formatting on mobile: Sometimes the swapped number loses formatting. Use a consistent pattern in your HTML.
If you’re stuck, Callroot’s support is decent, but don’t expect instant fixes. Google is your friend here.
Keep It Simple and Iterate
Getting dynamic number insertion working with Callroot isn’t hard, but it’s easy to overthink it. Start with your main sources, test the basics, and only add complexity if you need it. Most importantly—use the data to make real decisions. Otherwise, you’re just swapping numbers for fun.
Good luck, and remember: track, test, repeat. That’s as complicated as it needs to be.