Tracking iPhone Devices via UserAgent & Screen Size

Bronze Contributor
Bronze Contributor

What is the best method to attain the user agent, search if the useragent has iphone within it, then assign it to an Adobe Report?

Is it best to identify the useragent, assign it to a variable, then concatenate , send the information in this type of format:

  • iPhone 3 and earlier versions: 480 × 320
  • iPhone 4 and iPhone 4S: 960 × 640
  • iPhone 5: 1136 × 640
  • iPhone 6: 1334 × 750
  • iPhone 6 Plus: 1920 × 1080
1 REPLY 1

Tracking iPhone Devices via UserAgent & Screen Size

Silver Contributor
Silver Contributor

We did something like this. We used a separate variable for this in Adobe Analytics.

The code we used is here: https://github.com/tibu/checkMobileAgent

 

Public