---
title: How to Implement Google Ads Call Tracking Numbers for Existing Digital Clients
description: Step-by-Step Guide to Setting Up Google Ads Call Tracking for Your Existing Digital Clients
---

[Skip to content](https://grow.dentalmarketing.com/university/how-to-implement-google-ads-call-tracking-numbers-for-existing-digital-clients#main-content)

English

Show submenu for translations

[Customer portal](https://grow.dentalmarketing.com/tickets-view?hsLang=en)

![DentalMarketing-Logo2-White copy-1.png\]](https://grow.dentalmarketing.com/hs-fs/hubfs/DentalMarketing-Logo2-White%20copy-1.png?height=40&name=DentalMarketing-Logo2-White%20copy-1.png)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations
- [Customer portal](https://grow.dentalmarketing.com/tickets-view)
- [Don't see the SOP you're looking for? Submit your suggestion here.](https://share.hsforms.com/1Fk5_GHeGTTqeJyg4BwR0CAdihez)

[Don't see the SOP you're looking for? Submit your suggestion here.](https://share.hsforms.com/1Fk5_GHeGTTqeJyg4BwR0CAdihez)

 Welcome! What article can we help you find?

- There are no suggestions because the search field is empty.

1. [Internal](https://grow.dentalmarketing.com/university?hsLang=en)
2. [Paid Media SOPs](https://grow.dentalmarketing.com/university/paid-media-sops?hsLang=en)

# How to Implement Google Ads Call Tracking Numbers for Existing Digital Clients

## Step-by-Step Guide to Setting Up Google Ads Call Tracking for Your Existing Digital Clients

This Standard Operating Procedure (SOP) outlines the steps for implementing Google Ads call tracking numbers for existing digital clients. By integrating call tracking into Google Ads campaigns, you can gain valuable insights into customer interactions, improve conversion tracking, and optimize ad performance. This guide will walk you through the process, from setting up the call tracking numbers to configuring them within Google Ads, ensuring that all calls generated through ads are accurately tracked and reported. Following this SOP will help ensure that your clients’ campaigns are fully optimized for lead generation and performance analysis.

 

- **Search for the Practice Project:**
  
    - Go to Webflow and search for the practice project by typing the practice name.
    - Click on "Site Settings" (the tool symbol).
    - Navigate to the "Custom Code" section and locate the Footer Code section.
- **Locate the Cloudflare Code:**
  
    - In the Footer section, search for the line containing "cloudflare.com."
- **Insert the Tracking Script:**
  
    - Copy and paste the provided script here:
    - ![Screenshot 2025-01-30 at 1.10.08 PM](https://grow.dentalmarketing.com/hs-fs/hubfs/Screenshot%202025-01-30%20at%201.10.08%20PM.png?width=688&height=270&name=Screenshot%202025-01-30%20at%201.10.08%20PM.png)

- - ```
      <script>// Define your current and Twilio tracking numbersvar currentNumber = '(000) 111-2222'; // Replace with the current phone number on the sitevar trackingNumber = '(000) 333-4444'; // Replace with the Google Ads Twilio tracking number// Helper function to normalize phone numbers by removing spaces, dashes, and parenthesesfunction normalizePhoneNumber(number) {    return number.replace(/\D/g, ''); // Remove all non-digit characters}// Helper function to create a regex that matches variations of the current phone numberfunction createPhoneNumberRegex(number) {    const normalized = normalizePhoneNumber(number);    return new RegExp(`\\(?${normalized.slice(0, 3)}\\)?[\\s.-]?${normalized.slice(3, 6)}[\\s.-]?${normalized.slice(6, 10)}`, 'g');}// Function to process text nodes and replace phone numbersfunction processTextNode(node, phoneRegex, replacement) {    if (node.nodeType === Node.TEXT_NODE && phoneRegex.test(node.nodeValue)) {        node.nodeValue = node.nodeValue.replace(phoneRegex, replacement);    }}// Function to process tel: links in <a> tagsfunction processTelLinks(node, phoneRegex, formattedReplacementTel) {    if (node.tagName === 'A' && node.href.startsWith('tel:')) {        const normalizedHref = normalizePhoneNumber(node.href);        if (phoneRegex.test(normalizedHref)) {            node.href = `tel:${formattedReplacementTel}`;        }    }}// Recursive function to traverse and process nodesfunction traverseNodes(node, phoneRegex, replacement, formattedReplacementTel) {    if (node.nodeType === Node.ELEMENT_NODE) {        // Process Shadow DOM content if present        if (node.shadowRoot) {            traverseNodes(node.shadowRoot, phoneRegex, replacement, formattedReplacementTel);        }        // Process tel: links        processTelLinks(node, phoneRegex, formattedReplacementTel);        // Process child nodes        node.childNodes.forEach(child => traverseNodes(child, phoneRegex, replacement, formattedReplacementTel));    } else {        processTextNode(node, phoneRegex, replacement);    }}// Main function to replace phone numbers in the DOMfunction replacePhoneNumbers() {    const phoneRegex = createPhoneNumberRegex(currentNumber);    const formattedReplacementTel = normalizePhoneNumber(trackingNumber); // Ensure the phone number is normalized    traverseNodes(document.body, phoneRegex, trackingNumber, formattedReplacementTel);        // After replacement, check if any phone numbers are left to replace    checkForRemainingNumbers();}// Check if any phone numbers are still in the DOMfunction checkForRemainingNumbers() {    const phoneRegex = createPhoneNumberRegex(currentNumber);    const remainingNodes = document.body.innerHTML.match(phoneRegex);        if (remainingNodes && remainingNodes.length > 0) {        // Optionally, you could track how many numbers are left, but no log is needed now    }}// Force a re-scan of the document after initial replacementfunction forceRescanForRemainingNumbers() {    const phoneRegex = createPhoneNumberRegex(currentNumber);    const formattedReplacementTel = normalizePhoneNumber(trackingNumber); // Normalize the replacement phone number    traverseNodes(document.body, phoneRegex, trackingNumber, formattedReplacementTel);}// Observe and process dynamically added contentfunction observeDOMChanges() {    const phoneRegex = createPhoneNumberRegex(currentNumber);    const formattedReplacementTel = normalizePhoneNumber(trackingNumber);    const observer = new MutationObserver(mutations => {        mutations.forEach(mutation => {            mutation.addedNodes.forEach(node => {                traverseNodes(node, phoneRegex, trackingNumber, formattedReplacementTel);            });        });    });    observer.observe(document.body, { childList: true, subtree: true });}// Check if "network=g" is present in the URLfunction isGoogleNetworkVisitor() {    const urlParams = new URLSearchParams(window.location.search);    return urlParams.get('network') === 'g';}// Store "network=g" in local storagefunction storeNetworkParam() {    if (isGoogleNetworkVisitor()) {        localStorage.setItem('networkGoogleAds', 'true');    }}// Check local storage for "networkGoogleAds"function isGoogleAdsSession() {    return localStorage.getItem('networkGoogleAds') === 'true';}// Initialize on page loaddocument.addEventListener('DOMContentLoaded', () => {    storeNetworkParam();    if (isGoogleAdsSession()) {        replacePhoneNumbers();        forceRescanForRemainingNumbers();  // Force re-scan after initial replacement        observeDOMChanges();    }});</script>
      ```
- **Replace Placeholder Numbers:**
  
    - At the beginning of the code you pasted, replace the current `currentNumber` and `trackingNumber` placeholders (refer to the image below). 
          - `currentNumber`: The website’s phone number.
          - `trackingNumber`: The Google Ads tracking number.
          - ![Screenshot 2025-01-30 at 1.11.13 PM](https://grow.dentalmarketing.com/hs-fs/hubfs/Screenshot%202025-01-30%20at%201.11.13%20PM.png?width=688&height=270&name=Screenshot%202025-01-30%20at%201.11.13%20PM.png)
- **Save the Changes:**
  
    - Click **SAVE** to confirm the changes.
- **Publish the Site:**
  
    - Hit **PUBLISH** to apply the changes to the live website.
- **Confirm Correct Setup:**
  
    - To verify that everything is set up correctly, go to the practice’s website and append the following string to the end of the URL:
      
       
      
      `/?keyword=family%20dentist&matchtype=e&network=g&adposition=1&device=m`
    - Ensure that the Google Ads tracking number appears in both the header and footer of the website.

- [Paid Media SOPs](https://grow.dentalmarketing.com/university/paid-media-sops?hsLang=en#main-content)

    - [Account Management & Updates](https://grow.dentalmarketing.com/university/paid-media-sops?hsLang=en#account-management-updates)
    - [Google Ads](https://grow.dentalmarketing.com/university/paid-media-sops?hsLang=en#google-ads)
    - [Google Tag Manager](https://grow.dentalmarketing.com/university/paid-media-sops?hsLang=en#google-tag-manager)
- [Creative Team SOPs](https://grow.dentalmarketing.com/university/creative-team-sops?hsLang=en)
- [Client Success SOPs](https://grow.dentalmarketing.com/university/client-success-sops?hsLang=en#main-content)

    - [Photoshoot](https://grow.dentalmarketing.com/university/client-success-sops?hsLang=en#photoshoot)
    - [Claude Design Landing Pages](https://grow.dentalmarketing.com/university/client-success-sops?hsLang=en#claude-design-landing-pages)
- [Technology SOPs](https://grow.dentalmarketing.com/university/technology-sops?hsLang=en#main-content)

    - [HubSpot](https://grow.dentalmarketing.com/university/technology-sops?hsLang=en#hubspot)
    - [Other](https://grow.dentalmarketing.com/university/technology-sops?hsLang=en#other)
- [Onboarding SOPs](https://grow.dentalmarketing.com/university/onboarding-sops?hsLang=en)

# Dentalmarketing.com

dentalmarketing.com Help Center

Copyright © 2026, Dentalmarketing.com