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.
Hey Jared - Let me take a closer look and see if I can spot anything odd. Lookout for my email shortly
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
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 Johnny
Thanks very much for this. I’ll do this now and report back on my results in a bit.
Cheers…Graham
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.
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…
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!
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.
Thanks for sharing your progress with this one, Ricky!