Add Google Forwarding Numbers to UnBounce?


#1

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…


#2

Hi Bart,

This is a very new feature from Adwords so we haven’t seen it in action yet. However, there’s no reason why it shouldn’t work on your Unbounce pages!

But instead of attaching that function to the ```

  
 ```<script> <br /><br />
 $(function(){ <br /><br />
  _googWcmGet('number', '1-800-123-4567'); <br /><br />
 }); <br /><br /> </script>   

You can insert this script onto your page as a JavaScript. You will also need to give each instance of your phone number on your page a class of ‘number’, so that Google can replace it with their own tracking number.

This should get things working! Unfortunately there’s no way that we can test it for sure, because Google’s script only kicks in once you’ve actually clicked an Adwords ad and arrived on that variant of the landing page. You could perhaps set up a test ad to see if this is working yourself.


#3

Mark,
How do we “give each instance of your phone number on your page a class of ‘number’”. I don’t see a way to change “Class” for an element on a page. Can you clarify?


#4

Hi Tom,

This is an advanced feature from Adwords and as such it does require you to manually edit some HTML on your page.

You can add the class to your phone numbers by double-clicking on the text box and clicking Source. Say you saw this:

1-800-123-4567

what you would then have to do is add class=“number” to the element containing the phone number. So afterwards it should look like this:

1-800-123-4567

I’ll reiterate the importance of testing that this is actually working. This will involve running an ad with a test page as the destination URL, clicking on the ad in a search result (and paying for the click), and then seeing whether Google have switched out the phone number on your page.


#5

Hi Mark,
Thanks for the clarification. One more question. Does the phone number have to be in that exact format? ie. 1-800-nnn-nnnn For example, can it be in this format: (800) nnn-nnnn?


#6

Hey Tom - Google doesn’t explicitly say what format your default number needs to be in, but I believe they just swap out that placeholder value for the dynamically inserted one.

If you are using an 800 number, I would recommend adding the 1 as well. That way if people are using mobile browsers or have a plug-in that lets them click to call, that functionality will work.

I’d love to hear what your experience was like once you get everything set-up.


#7

Thanks! Is there a way to force a variant to load (the one with the dynamic phone code)? Perhaps with a cookie? I’d hate to keep clicking ads until the correct variant shows up.


#8

Also, the jquery method causes a minor delay in changing the phone number. Is there a way to load it instantly. I’d hate for my visitors to think the phone number might be hacked since it visibly changes.


#9

Hi Phillip - There isn’t a way to load a variant directly through an ad. If you’re testing, you could quickly set that variant to have 100% of the traffic, run the click through and then change your weighting back.

You’ll need to clear your cache before you click through from the ad to make sure you don’t load a cached version of the page.


#10

There is a cookie that forces same variants to load once you visit the page. Those are called “ubpv”. They don’t expire for 6 months. So you will need to delete it before you get a new variant.

I set the new variant to 99% weight (couldn’t do 100% because it wasn’t the champion) and deleted the cookie and the variant I wanted loaded.

I’m sure there is a technical way to overwrite the “ubpv” cookie, but I didn’t look into it since the 99% weight loaded it for me.


#11

Not sure if I should start my own thread or continue here but thought I’d just stay here as the topics are the same.

Just want to clarify, there are two code snippets required. The first is generated by AdWords and you are told to post it to the header of each page you want to track.

The code is given to us like this:

(function(a,e,c,f,g,b,d){var h={ak:"1004988215",cl:"QocMCJSOqVYQt86b3wM"};a[c]=a[c]||function(){(a[c].q=a[c].q||[]).push(arguments)};a[f]||(a[f]=h.ak);b=e.createElement(g);b.async=1;b.src="//www.gstatic.com/wcm/loader.js";d=e.getElementsByTagName(g)[0];d.parentNode.insertBefore(b,d);a.\_googWcmGet=function(b,d,e){a[c](2,b,h,d,null,new Date,e)}})(window,document,"\_googWcmImpl","\_googWcmAk","script");   

Notice there are no script tags. When i entered mine this way the code snippet displayed at the top of my pages.

Question 1 - I assume we are supposed to wrap it in the tags correct? Still insert it in the Header section?

+++++++++++++++++++++
With the 2nd code snippet they tell us it should look like this:


  
1-800-123-4567   
 

I tried adding this in my text field but it dropped all the script features. I then read your post above and added it as a javascript entry for the Body of my page using the format you suggested of:

<script> <br />
$(function(){ <br />
 _googWcmGet('number', '1-800-123-4567'); <br />
}); <br /> </script>   

Question 2 - When I tested this out the phone # did not change. What am I missing? Where/how should the 2nd code snippet be added to the page?

You originally said “But instead of attaching that function to the tag, you’ll just want to wrap it in a jQuery function that runs when the page is ready.”

Can you please clarify? Does this mean this snippet is NOT to be entered as javascript in the javascript section of our pages? (found along the bottom of our page edit screens)? You say we can just add it to the page - do we enter it using a Custom HTML section?

Sorry if these questions seem basic. I am less a programmer and more an AdWords consultant than anything. Trying to get this new phone call tracking set-up for several of my clients and need to work out the kinks


#12

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.


#13

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


#14

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…


#15

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


#16

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!


#17

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


#18

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


#19

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


#20

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