Ever wish you could find out how many people click the “call now” or “send mssage” buttons on your mobile website? Well, you can! With Google Analytics event tracking, it’s simple.
Install Basic Analytics Tracking Code
First, make sure you have you analytics tracking code on all your pages, just before the </head> tag. It looks like this (where “UA-XXXXXXXX-X” is your Analytics Property ID (find it in the Admin section of Analytics)):
var _gaq = _gaq || ;
ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
var s = document.getElementsByTagName(‘script’); s.parentNode.insertBefore(ga, s);
Add the Links You Wish to Track
Now, add links that, when clicked, trigger a phone call, email message or text message. Here’s what they’ll look like:
- Code to create a “call” button on a mobile site: <a href=”tel:1111111111″>Call 111.111.1111</a> anytime.
- Code to create a “message” button on a mobile site: <a href=”mailto:emailaddresshere.com?subject=Message from Mobile Site”>sending email</a>
- Code to create an SMS (text) message button on a mobile site: <a href=”sms:1111111111″>Contact us by text message</a>
Set up Event Tracking.
<a href=”tel:1111111111″ onClick=”_gaq.push([‘_trackEvent’, ‘Buttons’, ‘Call’, ‘Call from contact page’]);”>Call 111.111.1111</a>anytime.
Where “Buttons” is your category (required), “Call” is your action (required) and “Call from contact page” is your optional label. There are other optional fields, but for the sake of simplicity, we’ll stop there.
View Analytics Reports
After a day or so, visit your Google Analytics dashboard. Go to Reporting>Content>Events. Make sure data is being collected properly.
Set Up Event Goals
- In Analytics, click on “Admin” and choose the site.
- Click on the “Goals” tab.
- Click “+Goal” to add a goal to one of the goal sets.
- Click “Active”
- Give your goal a name. We’ll make ours “Calls from mobile site”
- Choose goal type “Event”.
- Using the tracking code we set up above, we would select:
- Category that matches Buttons.
- Action that matches Call.
- Label that matches Call from contact page.
- Choose a value that corresponds to the value of the action taken. We chose 50.
Test Your New Event Goals
- 16 case studies prove ROI of mobile marketing (biznology.com)
- How to Send a Text Message from Your Mobile Website (answers.oreily.com)
- Five Reasons Why You Need a Mobile Website Now! (scalablesocialmedia.com)