Dynamic Number Insertion (DNI) 101: Getting started
Dynamic Number Insertion (DNI)
Dynamic Number Insertion (DNI) is a JavaScript tracking script that you install on your website. It dynamically replaces your business phone number with a Nimbata tracking number based on the visitor’s session and traffic source.
When a visitor lands on your website, a tracking number from your available number pool is temporarily assigned to that session. The visitor continues to see the same number while browsing. Once they leave the site, the number becomes available for another visitor.
Now you can accurately attribute incoming calls to their respective marketing sources, campaigns, ads, and keywords.
Before you begin
Before publishing your DNI script, make sure the following are already set up in your Nimbata account:
- At least one tracking number
- At least one destination number
- A call flow assigned to your tracking number
Dynamic Number Insertion will not activate unless a swap target and call routing are configured.
How DNI differs from source-based tracking
Nimbata supports both session-based tracking (DNI) and source-based tracking.
1. Source-based tracking:
- A fixed tracking number is assigned to a specific marketing source (e.g. Google Ads, Facebook).
- All visitors from that source see the same number.
- Attribution is available at the channel or campaign level.
2. Dynamic Number Insertion (DNI):
- Tracking numbers are assigned dynamically per visitor session.
- Attribution can include source, medium, campaign, keyword, and landing page.
- Enables more granular reporting when multiple visitors are on the site at the same time.
Questions answered with DNI

Publish your DNI Script
Step 1. Go to Tracking > Tracking Code.

Step 2. Configure your script. You can make changes such as number swapping, attribution, cookie duration, and page exclusions, and activate the Single Page Application (SPA) option. Feel free to make the changes that meet your business needs.

Step 2.5. What are swap targets?
Swap targets define which phone numbers or elements on your website will be replaced by tracking numbers.
You can configure swap targets to:
- Detect and replace phone numbers that appear on your pages, or
- Replace specific elements using span tags for greater control over where numbers appear.
At least one swap target must be configured for Dynamic Number Insertion to work.
Step 3. Publish your Script. You can use Google Tag Manager or via HTML or our WordPress plugin to activate dynamic call tracking.
Testing DNI Configuration
To test your DNI configuration, start by visiting your website and ensure that the displayed phone number is the call tracking number instead of your business number if you are tracking all channels. If you are tracking only paid channels, visit the test URL www.yoursite.com/?gclid=test by copying and pasting the ?gclid=test part after your website's URL, and verify that the phone number displayed on your website is the call tracking number. If the correct call tracking number appears, your DNI configuration is working properly.
If it does not appear, confirm that:
- Your tracking number is assigned to a call flow
- At least one swap target is configured
- The script is installed correctly on the page
How many tracking numbers do I need for DNI?
The number of tracking numbers required for Dynamic Number Insertion depends on your website’s traffic and the average duration of visits.
Nimbata provides a tracking number pool calculator to help you determine the recommended number of tracking numbers needed to ensure accurate call attribution.
FAQ on getting started with Dynamic Number Insertion (DNI)
Using DNI, you can better understand how website traffic translates into phone calls. For example:
- Which marketing channels are driving calls?
- Which campaigns or keywords generate phone leads?
- Are calls coming from mobile or desktop visitors?
- When do calls occur most frequently?
- Which landing pages lead to calls?
- Are calls from new or returning visitors?
- How many touchpoints occur before a call?
Call data can also be combined with outcomes (such as tags, call duration, or CRM integrations) to evaluate lead quality and campaign performance.
- Which marketing channels are driving calls?
Marketers can determine which specific marketing channels, such as online ads, SEO, social media, or email campaigns, are driving the most phone calls. This insight helps allocate resources effectively to the most impactful channels.
- What keywords or ad variations trigger calls?
Call tracking allows marketers to identify which keywords or ad variations are prompting phone calls. This helps refine keyword targeting and optimize ad campaigns for better results.
- Are calls resulting from mobile or desktop visitors?
Marketers can distinguish whether the majority of calls are coming from mobile or desktop visitors. This information aids in tailoring mobile and desktop experiences to better serve user needs.
- When do calls occur most frequently?
Call tracking reveals the time of day, day of the week, and specific periods when calls are most common. This data assists in scheduling ad campaigns, optimizing staffing for call centers, and delivering timely customer support.
- Which pages and content lead to calls?
Marketers can identify the pages and specific content that users engage with before making a call. This helps optimize website content and user journeys to encourage more conversions.
- How effective are different click-to-call CTA placements?
Call tracking allows you to add custom parameters so that you can track every minor detail of your phone calls. In this case you can add parameters to your different click-to-call ctas to see what works better for you (e.g. cta on header, in the middle of the page or footer) This knowledge guides cta placement decisions for maximum impact.
- Are calls converting into sales?
Call tracking can reveal whether calls generated from specific marketing efforts are translating into valuable outcomes such as sales, appointments, or other conversions.
- What is the quality of phone leads?
Call tracking data, including call recordings and metadata, can help you assess call quality and understand how conversations impact conversions.
- Which marketing touchpoints influence callers?
Marketers can assess which combination of touchpoints across different channels lead to the most calls. This holistic understanding informs multi-channel marketing strategies.
- What’s the ROI of marketing campaigns?
By correlating call data with sales data, marketers can calculate the return on investment (ROI) of various marketing campaigns and efforts.
- How can call handling be improved?
Call tracking data provides insights into call duration, call routing, and the quality of conversations. Marketers can identify areas for improvement in call handling and training.
- Are callers new or returning customers?
Call tracking enables marketers to distinguish between new callers and those who have interacted with the business before. This insight helps tailor marketing strategies to cater to both types of customers.
- How many calls does it take to close a sale?
Call tracking data can reveal the average number of calls it takes for a lead to convert into a sale. This information assists in understanding the typical customer journey and refining strategies to shorten the sales cycle.
- How many touchpoints lead to a sale?
Marketers can determine the number of touchpoints across different channels (such as website visits, emails, and ads) that a potential customer interacts with before making a purchase. This insight guides the design of effective multi-touchpoint campaigns.
- Which actions/campaigns generate the highest-value leads?
Call tracking enables marketers to discern not only which actions or campaigns are generating the most leads, but also which ones are yielding the highest-value leads. This distinction is crucial in prioritizing efforts towards strategies that result in leads more likely to convert into valuable outcomes, such as sales or long-term customer relationships.
Updated on: 16/02/2026
Thank you!