Google AdWords Phone Tracking on Your Website

Google AdWords Phone Tracking on Your Website

I was recently setting up my client’s Google AdWords phone tracking. And decided to track the phone clicks as events too within Google Analytics in case something goes wrong with the Google AdWords phone tracking code.

The Google AdWords phone tracking on your website works by adding a code snippet that will replace the number if the click came through Google AdWords. This will allow Google AdWords to replace your number you’ve listed on your website to something else and when the prospect calls that number, it’ll be forwarded to your listed number. This feature allows Google to track it as a conversion within Google AdWords which is the Key to AdWords success.

This is how you configure it on Google AdWords.

Step 1 – go to AdWords -> Tools Conversions, then click the Conversion button.

conversion

Step 2: select Phone Calls

phonecalls

Step 3: Select “Calls to a phone number on your website”

callstoaphonenumber

 

Step 4: Enter name of your conversion:enternameofconversion

 

Step 5: Select a Value for the phone call:

selectvalueofacall

 

Step 6: The rest of the set up you can choose accordingly and click Save and continue, you’ll then see this screen.

instructions

Step 7: Since my client was using a wordpress site and we are using the DIVI theme I would add the Tag for phone call in Step 6 item 1. to the head tag using divi theme’s integration section.divithemeintegration

Step 8: in step 6 item 2, google talks about adding a callback function as well as the _googWcmGet(target,business_number,options), I added it to my divi theme’s integration section as well. I use this code since I’m using my client’s website’s jquery inclusion.

<script type="text/javascript">
var callback = function(formatted_number, mobile_number) {
 // formatted_number: number to display, in the same format as
 // the number passed to _googWcmGet().
 // (in this case, '1-800-123-4567')
 // mobile_number: number formatted for use in a clickable link
 // with tel:-URI (in this case, '+18001234567')
 jQuery("a[id^=phnumber]").each(function(){
 jQuery(this).attr('href',"tel:" + mobile_number).html(formatted_number);
 });
};
jQuery(document).ready(function(){
_googWcmGet(callback, '800-123-4567');
});
</script>

Note: quick explanation here, I’m using jQuery to iterate through all a href tags with the phnumber as the starting id and make sure each one is handled properly. If google sends the site a forwarding number all phone numbers will be updated properly.

Step 9: I then coded all my phone numbers in the site accordingly. I will explain why I have phnumber0 to phnumber2 a little later.

<a href="tel:18001234567" id="phnumber0">1-800-123-4567</a>
<a href="tel:18001234567" id="phnumber1">1-800-123-4567</a>
<a href="tel:18001234567" id="phnumber2">1-800-123-4567</a>

There you have it for Google AdWords website phone tracking.

Now I mentioned I also configured it as events on Google Analytics.. here how it’s done..

Google Analytics Tracking Phone Calls as Events

The concept behind tracking phone calls as events within Analytics is so that you can tie each event back to AdWords, you can link AdWords and Analytics together and use the Goals function to track events. You can phone calls or other events like maybe watching a video or other stuff. For now, I’m going to show you how I configure it together with AdWords phone tracking above. It’s somewhat redundant but that’s ok since I look at converted clicks in AdWords, so I want to make sure the converted click is tracked.

  • First step set up the goals to track events.
  • Second step set up the website so the events are triggered.
  • Third step link AdWords and Analytics.

Step 1: Set up the Goals in Analytics, under the Admin Tab – click on Goals and You’ll see a screen like this.

analytics-goal-event-setup

Step 2: make sure each time someone clicks on the phone links on the website it triggers an event within Google Analytics.

Add this to all the pages with phone tracking. Pigging backing off our initial set up this code snippet uses jQuery to add a click function to all the links defined previously.

<script>
jQuery("a[id^=ph]").click(function(){
ga('send', 'event', "CallEvent", "PhoneCall", jQuery(this).attr('id'), "1");
});
</script>

A little explanation here, I use the id of the a href as an event label so when someone clicks the phone number of the site it’ll be log as the id and since I have different ids for the different I’ll know which one is more effective.

Example in Analytics.

example-analytics

Step 3: Link AdWords and Analytics.

No need to rewrite this process it’s well documented at google follow this link.

 

There you have it folks.. please don’t hesitate to contact me if you need help. Contact me through our contact page.

Submit a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>