4K members online now
4K members online now
Use AdWords conversion tracking and reporting to measure your results. Have a question about Google Analytics? Post it here, on the Google Analytics Community!
Guide Me

Using Adwords Code to replace the number on my website

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭




I want to replace the number on my website to show as my cell phone number instead of my business number when someone clicks on my ad. I understand the following snippet would work if I was using a google call forwarding number, but I want to use my cell phone instead. What is the solution for this?


window.onload=_googWcmGet(‘google_number’, ‘(XXX) XXX-XXXX’);


1 Expert replyverified_user

Using Adwords Code to replace the number on my website

Top Contributor
# 2
Top Contributor

Hi Mark,


Do you currently have a Google forwarding number? If not, that script won't do what you might think. The number is only replaced if the visitor has a cookie that indicates AdWords source.


But you can do something similar with Javascript. I have to ask, if you don't have a Google forwarding number, why not just edit your web site to show your cell number instead of the business number? In order to replace the phone number with a script the way Google does it, you would need to place a specific tag around your phone number with either a class name or an id number. It might be easier just to edit your web site to show your mobile number.


One thing that occurred to me is you may be looking to show your cell number during off-hours. That you can do with Javascript. If the page shows the phone number more than once, surround the business number with span tags, and assign a unique class name to the spans. Then you can do something like this:


function showCellNumber() {


 for (i=0;i<document.getElementsByClassname('myphonenumber').length;i++){





You'll need to add some code to check the time and determine if you are open or closed.


Best of Luck!




petebardo -- Deadhead doing AdWords