Mobile
Article
By Wayne Roddy

Google Analytics Tracking for Mobile Sites

By Wayne Roddy
Last chance to win! You'll get a... FREE 6-Month Subscription to SitePoint Premium Plus you'll go in the draw to WIN a new Macbook SitePoint 2017 Survey Yes, let's Do this It only takes 5 min

Mobile sites are becoming extremely popular with businesses today. You could even argue that it’s catching up to Social Media as the “new buzzword” in Business Circles. My article is going to offer up one tip to make sure your new jQuery Mobile site is performing properly and getting the results you want.

Google Analytics Tracking for Mobile Sites is different than Tracking your Website. After all, the entire purpose of a Mobile Site is for quick, easy access for Mobile Customers. 99.9% of that traffic is looking for your Phone Number or Your Location, the customer has either already done a Google Search to find you or they are a direct visit.

So let’s track Clicks on Phone Numbers and Maps using Google Analytics. We assume you’ve already inserted the default Javascript into the header. Thats the code they give you with:

_gaq.push(['_setAccount', 'UA-XXXXXX-1']);

For this example, our business has multiple locations in the Tampa Bay Area and we want to track which city is receiving mobile visitor click-throughs. This data could be important for future mobile advertising, but mainly just so we know its an added service that our customers are using.

Our locations are separated by collapsible divs with a basic html a href link using “tel:813-XXX-XXXX” so the browser knows to render this link as a Phone Call. We’ve put each city inside a collapsible div to cut down on accidental phone calls, it does require an extra click to make a phone call but its better than receiving an accidental one which would skew our data. Below is our sample code for the entire DIV including our Google Analytics Event Tracking Code.

<div data-theme="a" data-collapsed="true" data-role="collapsible" class="ui-collapsible-contain">
    <h3>Tampa</h3>
    <p aria-hidden="true">
	<a href="tel:813-XXX-XXXX" onClick="_gaq.push(['_trackEvent', 'Phone', 'Clicked', 'Tampa Phone Call']);">Call 813-XXX-XXXX</a><br />
	XXX E Highway 92<br />
	Tampa, FL
    </p>
    </div>

Lets dissect the parameters of this Event. “Phone” is our Category, “Clicked” is our Action, and “Tampa Phone Call” is our Label. These parameters can be changed to whatever you like of course, but I recommend only changing the Label as needed. An example of another Category would “Map” or “Directions” if you posted a link to Your Google Maps Page.

Now lets see how this translates in Google Analytics. Under “Content” you will find “Events”. Without going through an entire Google Analytics lesson just click on “Top Events” and change “Viewing” to “Event Label”, you should see something similar to this:

--ADVERTISEMENT--

Summary

Now we can tell how many customers wanted to drill down to specific city phone numbers rather than calling the Main 800 Number on our mobile home page. I hope this helps you increase your mobile customer tracking.

Login or Create Account to Comment
Login Create Account
Recommended
Sponsors
Get the most important and interesting stories in tech. Straight to your inbox, daily.
Is it good?Is it good?