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.


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.

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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