AdWords
2.4K members online now
2.4K 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

Website Call Conversion and Google Tag Manager

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I am trying to implement tracking calls from a website where a Google forwarding number will replace our existing company phone number on the website. I've put all the code in place, but the phone number is not being changed to a Google forwarding number.

 

We are using Google Tag Manager, but I've manually placed the scripts on a test page. I placed the following right before </head>:

<script>
    (function (a, e, c, f, g, b, d) {
        var
        h = { ak: "1072522647", cl: "_br3CLih1FYQl8u1_wM" }; 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");
</script>

 

At the bottom of the page, right before </body> I placed:

<script>
var callbackPhone = function (formatted_number, unformatted_number) {
// formatted_number: number to display, in same formatting as number passed to _googWcmGet(). e.g '1-800-444-5555'
// unformatted_number: number to display without any formatting. e.g. '18004445555'
alert('in callbackPhone');
var e = document.getElementById("topphoneA");
e.href = "tel:" + unformatted_number;
var e = document.getElementById("topphoneB");
e.href = "tel:" + unformatted_number;
e.innerHTML = ""
e.appendChild(document.createTextNode(formatted_number));
};

jQuery(document).ready(function () {
    alert('before google');
    _googWcmGet(callbackPhone, '1-800-781-5187');
    alert('after google');
});
</script>

 

I have clicked on two different ads we have running in AdWords. When I go to our test page after clicking on an ad, I see the alert "before google" and the alert "after google" but I never see the alert I put in our call back function (callbackPhone). I used Firebug to step through the _googWcmGet function and I got a ways into it, so I know the code for that is found. I believe all the code is placed correctly on the page.

The value in the gwcm cookie is:

%7B%22expires%22%3Anull%2C%22number%22%3Anull%2C%22formatted_number%22%3Anull%2C%22fallback%22%3A%2218007815187%22%2C%22clabel%22%3A%22_br3CLih1FYQl8u1_wM%22%2C%22backoff%22%3A1412714926%7D

When I URL decode it, it appears to be json:

{"expires":null,"number":null,"formatted_number":null,"fallback":"18007815187","clabel":"_br3CLih1FYQl8u1_wM","backoff":1412714926}

For "number" and "formatted_number", the values are null, so I assume it won't trigger the callback function. When I view our Google ads after doing a search, I see a toll free number (not our own) with the ad which I assume is a Google forwarding number. What could prevent a phone number from being saved in the gwcm cookie?

1 Expert replyverified_user

Re: Website Call Conversion and Google Tag Manager

Community Manager
# 2
Community Manager
@theniks or @AdWiser, would you be able to help KrisAmOne?

Re: Website Call Conversion and Google Tag Manager

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

I have the same issue, cookie values are null.

Re: Website Call Conversion and Google Tag Manager

Community Manager
# 4
Community Manager
This 2014 thread has been closed to new replies.

If anyone has a new or unanswered question related to this topic, please start a new thread with a descriptive subject line, and post a clear, specific and detailed question or comment.

This will help other forum members to both see and understand your question fully, and answer it in a useful and effective way.

Thanks!