Dynamic number insertion (DNI) is a call tracking method that swaps the phone number displayed on your website with a unique tracking number for each visitor session, so when a caller dials, the system records which keyword, ad, and campaign brought that person to the site. For family law firms running Google Ads, this is the mechanism that connects a phone call back to the search query that triggered it. Without DNI, you can count clicks and form fills but cannot attribute phone calls, which is often where the majority of consultation requests come from.

If you want to know how do you track which keyword made the phone ring, DNI is the answer at the technical level. The setup is straightforward once you understand what each piece does and where firms commonly break the configuration.

What follows is a plain explanation of the mechanism, the setup steps, and the one mistake that quietly breaks attribution for a lot of law firm accounts.

What is dynamic number insertion and how does it work?

Dynamic number insertion is a JavaScript snippet that runs when a visitor loads your website. It reads the referral source (Google Ads, organic search, direct, referral) and replaces your real phone number on the page with a tracking number from a pool. Each visitor session gets its own tracking number for a window of time, usually 30 minutes to a few hours.

When that visitor calls the tracking number, the call tracking platform logs the keyword, ad, campaign, device, and landing page tied to that session, then forwards the call to your real office line. The caller hears nothing different. Your intake team answers as usual.

The data gets passed back into Google Ads as a conversion, so your reports show which keywords produced calls, not just clicks.

Receptionist answering a phone call at a front desk

Why does this matter for family law firms?

Phone calls drive a large share of family law consultations. People in the middle of a custody dispute or divorce decision often want to talk to a human quickly instead of filling out a form. If your campaigns cannot attribute those calls to specific keywords, you are optimizing blind on the channel that produces most of your leads.

Concrete impact: without call attribution, you might keep bidding on a broad keyword that produces lots of form fills but no calls, while cutting a narrower keyword that drives your highest-value phone consultations. Both show up as traffic. Only one is actually generating cases.

Family law keywords are among the most expensive terms in Google Ads. Understanding which specific queries produce consultations is one of the fastest ways to reduce wasted spend. ORSA builds call tracking into every account because of this.

What do you need to set up DNI correctly?

The components are consistent across call tracking platforms. You need:

  • A call tracking platform that supports DNI (CallRail, CallTrackingMetrics, WhatConverts, and similar tools).
  • A pool of tracking numbers large enough to cover your concurrent website visitors. Too few numbers means visitors share the same tracking number and attribution breaks.
  • The DNI JavaScript snippet installed on every page of your website, usually in the header or via Google Tag Manager.
  • Consistent phone number formatting across your site so the script can find and replace every instance.
  • Google Ads integration so call conversions flow back into the account at the keyword level.
  • Call recording and consent handling configured according to your state's two-party consent laws if you plan to record.

Once installed, test it. Open your site from a Google Ads click in an incognito window, confirm the number swapped, call it, and verify the call appears in your tracking dashboard with the correct keyword attached.

Close-up of a reception sign on an office counter

What is the one setup mistake that breaks DNI?

The most common mistake is leaving your real phone number hardcoded somewhere the script cannot reach. Common places this happens:

  • Phone numbers embedded in images or logos in the header. The script replaces text, not pixels in an image.
  • Numbers inside iframes, such as embedded chat widgets or third-party booking tools.
  • Numbers in PDF intake forms or downloadable brochures linked from the site.
  • Numbers formatted inconsistently (555-123-4567 in one place, (555) 123.4567 in another) when the script is configured to match only one format.
  • Click-to-call links where the tel: href was not updated by the script because the number is loaded dynamically by another plugin.

When any of these exist, a portion of your visitors see your real number instead of the tracking number. Those calls come in with no attribution and show up as "direct" or missing from reports entirely. You then undercount your Google Ads performance and make budget decisions on bad data.

Audit your site after installation. Load every page type (home, practice area pages, contact, blog), check every visible phone number, and confirm each one is swapping. Replace or rebuild any logo images that embed a phone number.

How does the keyword data actually appear in Google Ads?

Once DNI is working and your call tracking platform is integrated with Google Ads, calls that meet your qualification criteria (usually a minimum duration like 60 or 90 seconds) are sent back as conversions. In your Google Ads reports, you can then see:

  • Which campaigns, ad groups, and keywords produced phone call conversions.
  • Cost per call conversion at each level.
  • Combined conversion data when calls and form submissions are both tracked.

This lets you optimize bids, pause underperforming keywords, and expand on the ones producing qualified calls. For a deeper look at the tracking stack family law firms should run, see ORSA's resources on conversion setup and attribution.

Running Google Ads for your family law firm?

ORSA manages paid search for family law practices exclusively. If your campaigns should be producing more consultations, we’ll take a look and tell you what we see.

Book a Free Discovery Call

Frequently Asked Questions

Does DNI affect my SEO or local search presence?

No, when configured correctly. The real phone number should remain in your site's schema markup, Google Business Profile, and other citation sources. DNI only swaps the number for human visitors in a browser session. Search engines and directories still see your actual office number.

How many tracking numbers do I need in my pool?

Enough to cover your peak concurrent visitors from paid traffic. A small firm running modest Google Ads spend may only need five to ten numbers. Higher-traffic firms may need thirty or more. Most call tracking platforms will warn you if your pool runs out and visitors start sharing numbers.

Can I use DNI if my firm records calls?

Yes, but check your state's consent laws. Some states require two-party consent, meaning the caller must be informed the call is being recorded. Most call tracking platforms can play a short whisper message before connecting the call. Confirm your setup complies with your jurisdiction before enabling recording.

Will DNI work with my existing website?

In most cases, yes. The JavaScript snippet is lightweight and compatible with WordPress, Squarespace, Webflow, and custom-built sites. The one caveat is sites that load phone numbers through complex third-party plugins or heavy caching. Those may need adjustments before the script can reliably swap numbers.

Call attribution turns phone calls from an untrackable gap in your reporting into usable data you can optimize against. For family law firms, where consultation calls often outnumber form fills, this is the difference between running Google Ads on intuition and running them on evidence. The mechanism is simple, but the setup rewards attention to detail, especially on the audit step after installation.

Pull up your website right now, call the number displayed in the header from a phone that is not already in your CRM, and see whether the call shows up in your Google Ads conversions with a keyword attached. If it doesn't, your DNI setup needs a closer look. If you want help auditing your tracking or building a cleaner attribution setup, ORSA's Google Ads services are built around exactly this kind of work.