title: Changing All Phone Numbers in the HTML Code at once
body: <p>Im placing this code on my website to dynamically change the phone number text to a google forwarding number to track phone calls from my adwords account. It has worked great for some of my other accounts that have the phone number text displayed only once in the code.</p>
  
  <p>My problem with my current site is the phone number text is displayed in the code 2-3 different times and places. It is apart of the <code>&lt;a&gt;</code> clickable link code, the actual phone number text and the image alt display text. When i run my current code it only dynamically chages the first isntance of the number in the clickable link. Is there a loop I could add to this code in order to change all instances of this phone number?</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  (function(a,e,c,f,g,h,b,d){var k={ak:"949530000",cl:"jlDbCPj912oQkNvixAM"};a[c]=a[c]||function(){(a[c].q=a[c].q||[]).push(arguments)};a[g]||(a[g]=k.ak);b=e.createElement(h);b.async=1;b.src="//www.gstatic.com/wcm/loader.js";d=e.getElementsByTagName(h)[0];d.parentNode.insertBefore(b,d);a[f]=function(b,d,e){a[c](2,b,k,d,null,new Date,e)};a[f]()})(window,document,"_googWcmImpl","_googWcmGet","_googWcmAk","script");
  
  
  
  //Change the values in this section to customise for your implementation.
  
      //Replace with business's phone number EXACTLY as it appears on the website.
          var business_number = "866-755-8858";
  
      //Replace with business's phone number without spaces or symbols.
          var business_number_unformatted = "8667558858";
  
      //Replace this value with the unique selector for the phone number's element.
          var business_number_identifier = "p#dealerPhoneNum";
  
  //End customization section
  
      var callback = function(formatted_number, unformatted_number) {
          var numberElement = document.querySelector(business_number_identifier);
          var numberString = numberElement.innerHTML;
          numberString = numberString.replace(business_number,formatted_number);
          numberElement.innerHTML = numberString;
      };
  
      //The line of code below is for testing with GTM's debug mode.
      //It replaces the business phone number with a testing number (01234 567891).
          window.onload = callback('01234 567891', business_number_unformatted);
  
      //This code executes everything. When you're done testing and you're ready to publish the
      //GTM container, place '//' in front of the code above, and remove the '//' below.
          //window.onload = _googWcmGet(callback, business_number);
  
  
  &lt;/script&gt;
  </code></pre>