Setting up Report Suites + Views Based on Mobile Devices

Getting device level reporting views or report suites is much easier than you might think it is. Here is an quick and easy way to set up reporting suites (Adobe Analytics) or views (Google Analytics) within JavaScript.

//Any mobile device
var mobileDevice = navigator.userAgent.match(/mobi/i) !=null;

//Only Apple iPad Tablets
var isiPad = navigator.userAgent.match(/iPad/i) != null;

//Adobe Analytics
if (isiPad) { s.propXX = “Tablet | Apple iPad”; }

//Google Analytics
if (isiPad) { ga(‘set’, ‘dimensionX’, “Tablet | Apple iPad”);

Then within Adobe Analytics, you can set up a virtual report suite using the variable that captures the device. Within Google Analytics, you would need to create a view and set up a filter based upon the dimension either having that value or not (depending on what view you are looking to see – devices that are iPad or all non iPad ones).