Mobile device | Community
Skip to main content
aleber
New Participant
March 11, 2022
Solved

Mobile device

  • March 11, 2022
  • 2 replies
  • 2089 views

Hi,

on my implementation regarding a mobile App (iOS and Android), I'm able to collect a detail about mobile device for Android, not able for iOS, I have only Apple iPhone or Apple iPad, for Android I have further details.

Is it something intrinsic in  Adobe Analytics or do we need perform some additional settings?

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Employee
March 12, 2022

Hi @aleber 

Mobile devices report their firmware version in the user agent string, not the device version. For example, a current-gen iPhone contains an identical user agent as its last generation iPhone if they are on the same firmware version. Since there is no way to determine an iPhone’s device version using JavaScript, all iPhones belong in the same bucket. Mobile dimensions are strictly based on lookups that reference user agent, so you’ll find that all iPhones report a mobile screen size of 320 x 480.

If you want to collect iPhone device version, there are two ways that you can circumvent this limitation:

  • Use the iOS SDK: The mobile SDK contains dimensions that expose the device version for use in reporting. This method is more ideal for mobile apps than websites.
  • Use other variables available through Javascript: Some variables, such as screen.height and screen.width, can be used to infer device version. For example, you could use the following snippet of code on your site:
    if (navigator.userAgent.indexOf('iPhone') > -1) {
    s.eVarXX = screen.width + "x" + screen.height;
    }
    This code block first detects if the device is an iPhone. If it is, the code uses JavaScript to pull the screen resolution into an eVar. This method allows you approximately detect the device version if screen resolutions are unique.
Pallavi_Shukla_
Pallavi_Shukla_Accepted solution
New Participant
March 11, 2022