Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I've been using the instructions here to track visits to my Tumblr with Google Analytics for the last several months, but just realized today that the JavaScript doesn't run at all on mobile devices.

Is there any way to make this work? The majority of traffic to our site probably comes from mobile devices, so we'd really like to track this.

share|improve this question
add comment

1 Answer

Not all mobile devices can handle JavaScript so the Google Analytics code won't work on every mobile device. Google covers how to handle this with server side code as outlined here:

Activity on websites specially tailored for low-end mobile devices

All the same data that you've come to expect from your Google Analytics reports is now available for mobile websites. Simply paste our server-side code snippets (available for PHP, JSP, ASP.NET, and Perl) on each page you wish to track. Google Analytics then creates a profile for your mobile website where you can view the same kind of information that's in standard Analytics reports including visitor information and traffic sources. You'll be able to track users visiting your mobile website from both high-end "smartphones" and WAP devices.

For more information on tracking hits to mobile sites, see the server-side developer's guide.

share|improve this answer
    
Thanks, John. To clarify, I care specifically about the iPhone. I know JavaScript works in Mobile Safari, but Tumblr seems to strip out the Javascript tags in the mobile template. –  Bill Mar 23 '12 at 13:03
    
Can you edit the mobile template? If so you should be able to place the code into your custom HTML which should solve this problem. I'm not a tumblr user so I'm not sure exactly how that works. –  John Conde Mar 23 '12 at 13:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.