Beantin webbkommunikation

Beantin Beta Blog

Experiments, investigations, and tests of web things
September 18, 2012

Adding Google Analytics to your Tumblr mobile theme

Under the advanced section of the “customize” settings of your Tumblr blog there is the option to “use optimized mobile layout”.

Enabling this gives you a quick, clean, simple mobile version of your site which is shown automatically to mobile visitors.

One thing is lacks is any analytics script. You may have added Google Analytics to your regular Tumblr theme, but that won’t be included in this mobile version.

This means that no visits to your mobile version will be recorded.

The tumblr default mobile theme can’t be customised in the same easy way as your main (desktop) theme can.

To create a customised mobile theme and add Google Analytics, do the following:

  1. Create a new static page called /iphone-theme (it has to be called exactly that)
  2. Choose “Custom layout” as the page type
  3. Copy the default theme from this page on github and paste it in
  4. Add your Google Analytics code snippet just before the end of head section (follow the instructions given in GA)
  5. Make sure “use optimized mobile layout” is ticket in advanced settings

Give it a test and you should pretty soon start to see mobile visitors in your GA reports for your Tumblr site.

Related Posts Plugin for WordPress, Blogger...


Filed under Tumblr.

Tags: , , , ,

Theme Beantin created by James Royal-Lawson. Privacy Policy