AdWords
2.8K members online now
2.8K 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
star_border
Reply

Call Forwarding Number Swapping Script on Webpage

Explorer ✭ ☆ ☆
# 1
Explorer ✭ ☆ ☆

Is it possible to swap multiple numbers with the same script? I have a website where we are using _googWcmGet(‘Number’, ‘ 1 (877) 356-****’) to swap the toll free number on the site. 


If i changed the script to _googWcmGet(‘Number’, ‘ 1 (877) 356-****’, '(905-564-****') would it swap them both? or would i have to add in another script to the website for that number? And if that is so, would that effect the previous swapping script?

 

Thanks

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by KathleenG (Community Manager)
November 2015

Re: Call Forwarding Number Swapping Script on Webpage

Top Contributor
# 2
Top Contributor
Hi Cedric,

No, that won't work. What you need to do is create a function that receives the Google number from the _googWcmGet call and then have that function replace the phone numbers. Give each instance the same class name, one that's not used for anything else.

Look on this page: https://support.google.com/adwords/answer/6095883?hl=en

Expand the section that says, "Part III: Create a JavaScript snippet to display a Google forwarding number". You should find everything you need there, under example number 2 or 3. Instead of using getElementById, use getElementsByClassName to return an array of all instances of the class on the page, then loop through them and insert the Google number.

If you don't understand how to do this, I'd recommend getting a developer who knows Javascript to help you with this. It should take under an hour to implement.

Example 3 is for mobile phones, click to dial.

Best of Luck!

Pete
petebardo -- Deadhead doing AdWords

View solution in original post

Marked as Best Answer.
Solution
Accepted by KathleenG (Community Manager)
November 2015

Re: Call Forwarding Number Swapping Script on Webpage

Top Contributor
# 2
Top Contributor
Hi Cedric,

No, that won't work. What you need to do is create a function that receives the Google number from the _googWcmGet call and then have that function replace the phone numbers. Give each instance the same class name, one that's not used for anything else.

Look on this page: https://support.google.com/adwords/answer/6095883?hl=en

Expand the section that says, "Part III: Create a JavaScript snippet to display a Google forwarding number". You should find everything you need there, under example number 2 or 3. Instead of using getElementById, use getElementsByClassName to return an array of all instances of the class on the page, then loop through them and insert the Google number.

If you don't understand how to do this, I'd recommend getting a developer who knows Javascript to help you with this. It should take under an hour to implement.

Example 3 is for mobile phones, click to dial.

Best of Luck!

Pete
petebardo -- Deadhead doing AdWords