Add Google Forwarding Numbers to UnBounce?



Show first post

35 replies

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

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.

Userlevel 3
Badge +1

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.

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.

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.

Userlevel 3
Badge +1

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.

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?

Userlevel 2

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.

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?

Userlevel 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.

Reply