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

Adwords Dynamic Call Tracking on a Wordpress site

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi - I've been trying to set up Adwords Dynamic Call Tracking on a Wordpress site, but am not that familiar with java script.

If someone experienced with this could check the code and give any recommendations I would appreciate it very much.

So, I am using the thrid option: Example 3: Pass the Google forwarding number to a custom callback function on your mobile site from Google's guide: https://support.google.com/adwords/answer/6095883?hl=en .

I have input the following into the header.php file before the closing header tag (I've replaced identifying numbers):

<script type="text/javascript">
(function(a,e,c,f,g,b,d){var h={ak:"957923882",cl:"6Xxtz4yAMcWpkgCMFsQ"};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._goog... Date,e)}})(window,document,"_googWcmImpl","_googWcmAk","script");
</script>

<script type="text/javascript">
var callback = function(020 7678 9999, +4420 7678 9999) {
// formatted_number: number to display, in the same format as
//        the number passed to _googWcmGet().
//        (in this case, '020 7678 9999')
// mobile_number: number formatted for use in a clickable link
//        with tel:-URI (in this case, '+4420 7678 9999')
var e = document.getElementById("number_link");
e.href = "tel:" + +4420 7678 9999;
e.innerHTML = ""
e.appendChild(document.createTextNode(020 7678 9999));
};
</script>


Is this code correct?

 


Next, in the opening body tag I have put the following code:

<body onload="_googWcmGet(callback, '020 7678 9999')">


And where the number appears within the pages/ widgets I have put the following code:

<a href="tel:020 7678 9999" id="number_link">020 7678 9999</a>


Any feedback/ guidance would be much appreciated.

Thanks

1 Expert replyverified_user
Marked as Best Answer.
Solution
Accepted by Mini-CM (Community Manager)
September 2015

Re: Adwords Dynamic Call Tracking on a Wordpress site

Follower ✭ ✭ ☆
# 2
Follower ✭ ✭ ☆
When I set it up I used this. Hopefully it helps you.

https://support.google.com/adwords/answer/6095821

Specifically part II has the sample code for the site.

Re: Adwords Dynamic Call Tracking on a Wordpress site

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Hi this answer does not help me as my question was regarding Dynamic Call Tracking, but thanks anyway.

Re: Adwords Dynamic Call Tracking on a Wordpress site

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
Hi Derek,

Have you found out how to implement the javascript on your website?

I'm trying to work out how to do so as well. It's a great functionality, but the explanation how to implement is a little cryptic.

Regards
Arnoud

Re: Adwords Dynamic Call Tracking on a Wordpress site

Community Manager
# 5
Community Manager
This 2015 thread has been closed to new replies. 
 
Should anyone have a new or unanswered question related to this topic, please start a new thread and post a clear, specific and detailed question that describes your particular situation.
 
This will improve the visibility of any new questions as well as help other forum members to understand your question fully, and answer it in a useful and effective way
 
To start a new thread, please go to the top level of the AdWords Community, and from there, click on the board that is most closely related to your question. After that, you can click on the pink "+" sign in the lower right corner of the screen to start a new topic.
 
Thank you.