Add Google Forwarding Numbers to UnBounce?


Can you add Google Forwarding Numbers to UnBounce pages? The instructions require adding a piece of Javascript code between the head tags on a page. Doesn’t seem to work using the current Javascript options in UnBounce (i.e. changing “placement” to Head and adding the code there).

This is the functionality I’m talking about: http://techcrunch.com/2014/08/18/goog…


35 replies

Thanks for sharing your progress with this one, Ricky!

I’ve been able to get this to work, but run into the problem if the number and tag exists more than once on the page. 

If the number is in two places, the Google Tag Assistance (Chrome Extension) gives the error that the element ID is used more than once. 

I had to duplicate the script that changes the number and name each different names. Then in the page, one instance of the number gets one ID and the next gets the second ID.

Hello Guys.

I’ve read this post, and the one you posted Johnny, and the Google explanations, and other websites and users explanations, and deleting the cookies, and clearing the cache, and using the class “number” and placing the snippet and yada yada yada. I have not missed anything, including a live Call Extension.

IT’S STILL NOT WORKING… 😦

here are the class “number” I’ve used:

Here are the codes I’ve placed:

Adwords:

Google:

The number stays the same when I click FROM AN AD.

Have I missed anything else?

Thanks!

Userlevel 3

Hey All

We’ve created article detailing the best approach for adding Google Adwords Call forwarding numbers to your landing page.

http://support.unbounce.com/entries/5…

Please let us know if this works on your end, Graham. Curious to see if you get a lot of use out of this functionality. 

Hi Johnny

Thanks very much for this. I’ll do this now and report back on my results in a bit.

Cheers…Graham

Userlevel 3

Hey Graham

Google support article details how to do this here:

https://support.google.com/adwords/an…

Click on ‘step 2’ and see the last example.

In summary it looks like you first need to add a ‘callback’ function:

       var callback = function(formatted_number, unformatted_number) { <br />
           var e = document.getElementById("number_link"); <br />
           e.href = "tel:" + unformatted_number; <br />
           e.innerHTML = "" <br />
           e.appendChild(document.createTextNode(formatted_number)); <br />
       }; <br /> </script>```   
 
With this your onBody call is slightly different so use this updated function instead:   
 
```<script> <br />
$(function(){ <br />
 _googWcmGet(callback, '1-800-123-4567'); <br />
}); <br /> </script>```   
 
And lastly you'll want to modify your `````` tag link to contain the id 'number\_link'   
 
```[1-800-123-4567](tel:18001234567)```

Hi

For my mobile unbounce landing page I have the phone number set up for click to call like this:

Where the blurred out bits are my number. So I’ve inserted the span class=“number” tag around the visible clickable number. But what about the number in the anchor tag. Do I need a span around that too? And if so, any idea how I code it?

Many thanks

Graham

Userlevel 3

Hey Jared - Let me take a closer look and see if I can spot anything odd. Lookout for my email shortly

The tech department at Google seems to think my issue is not using the body onload version of the code and instead using:

Has anyone been able to make this work using the body onload version of the code as Google suggested?

Neither version seems to be working for me.

I appreciate all the feedback…

A 51:34 phone call to Google and it appears it’s an issue on their end. They’re getting some kind of error code that they don’t even know what it is.

It’s been sent up the chain to their tech department to figure out.

I will keep you posted with what they say.

Userlevel 3

Hey Brent - Thanks for helping out!

Jared - There are a couple things you can check. First make sure your page is republished with the most recent changes you made.

Next, clear your browsers cache to ensure your browser isn’t displaying old code.

Also, according to Google the number can take up to an hour to enable and will only be shown to users coming in from a ad:

“It can take up to an hour for your ads to be enabled for this conversion action. If you’d like to make sure it’s working, you can do a search that brings up your ad, then click the ad to visit your website (you’ll be charged for the click). Your regular phone number should now be replaced with a Google forwarding number. If you’re doing repeated tests, delete the “gwcm” cookie from your browser before clicking on an ad again.”

They also suggest your cookies/cache be cleared before testing.

That looks right to me. Here’s mine

That looks the same as well…

Here is mine

That looks to be the same as mine, how about this second part of the code that Google doesn’t exactly give clear instructions for…

Here is a screencap of my span class tags around the phone number so you can compare with yours

I checked that when I read your post above… That’s set up correctly

That code looks correct to me (or at least it matches how I did the span tag around my phone number with the other formatting tags around it)

I found that I had not completed the set-up of the Phone Call Conversion within AdWords itself. Not sure if this is what you are missing but one step they list is the campaign has to have a Call Extension set-up and it has to be set to use the Google tracking number. Once I finalized my Call Extension changes it started working for me

I’ve done all the steps above and it’s not working for me…

This is the only part of the code that I think may be a problem. Any chance someone can take a look at it?

I’ve also attached images of the other two parts of the code.

Any help would be greatly appreciated. A massive part of conversions for this client is phone calls so this would be huge to have in AdWords reporting and not separate call tracking.

Thanks for any and all feedback,
Jared

Woops! scratch that. It all worked. The error was on my end as I had not made my call extensions live.

Quinn

Thank you SO MUCh for your help. You made it easy for a neophyte javascript-guy like me.

Much appreciated!

Quinn,

I am stumped. I think I did the code entry the way you described I have now gone and clicked on my clients ad (incurred costs) to do my test but the phone number isn’t updating.

Can I get someone on the support team to look at my page to double check the code?

I’d post this to support chat but feel I’d have to start over with the explanation and you seem to be up to speed on this stuff. But if that is route I need to go just let me know

Userlevel 3
Badge +1

Hi Brent - Yup, right now, you actually need to click through from an actual ad. Considering what some keyword clicks can cost, I would have expected a test mode, but Google mentions it themselves under “Track calls from a website”, then “Paste the code in your website’s HTML” https://support.google.com/adwords/an…

Thanks Quinn, I will try this later or tomorrow.

So clicking on the ad from my AdWords management panel won’t be sufficient to get the phone number to show?

I’ll have to find some cheap keyword and create a test ad group lol. Some of these clicks are expensive

Userlevel 3
Badge +1

Hi Brent,

For Q1, you will need to wrap that code in some <script></script> tags. It should then go in the head.

The second code snippet (Mark’s variation, not the original body onload one) can be entered in the Javascripts panel in Unbounce. It should be placed before the body end tag, since it needs to be after any of the target functions.

Q2. To get the actual numbers on your page, you’ll need to wrap them in span tags. You can add these in the Text editor in Unbounce if you switch to source view first.

ex.

1-800-123-4567

Anything wrapped in those span tags with the class set as “number” should be replaced.

Note that Adwords doesn’t provide a way to test this, so to check it you’ll actually need to click through (and also pay for that click unfortunately) from a live ad.

Reply