Safari (in-app) as reported by Google Analytics
Google Analytics provides breakdowns by user agent and on Crossword Tracker’s statistics I recently noticed a separate entry for Safari named Safari (in-app). Looking back it actually started exactly on August 21st which is probably when Google updated its user-agent parsing code to separate out this traffic. Safari (in-app) appears to refer to users opening your website in a UIWebView (developer talk for a web browser embedded in an iOS or Mac application). You can customize the user agent in a UIWebView and Google Analytics breaks those out when they can (they do this with Chrome for iOS), but if you leave it to the default it shows up as an iOS device without a defined version of Safari. Previously these visits were counting as “Mozilla Compatible Agent”, but they are now Safari (in-app). Here’s what the chart looks like for iOS traffic just before, during and directly after the change:
I did some digging to find out how Google Analytics would be able to differentiate and here’s what some iOS user agents look like:
Mobile Safari
Mozilla/5.0 (iPhone; CPU iPhone OS 6_1 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10B143 Safari/8536.25
Home screen app (bookmark saved to homescreen)
Mozilla/5.0 (iPhone; CPU iPhone OS 6_1 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Mobile/10B143
Chrome for iOS
Mozilla/5.0 (iPhone; CPU iPhone OS 6_1 like Mac OS X; en-us) AppleWebKit/536.26 (KHTML, like Gecko) CriOS/23.0.1271.100 Mobile/10B143 Safari/8536.25
1Password
Mozilla/5.0 (iPhone; CPU iPhone OS 6_1 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) 1Password/4.1.2 (like Version/10B143 Mobile/6.1 Safari/8536.25)
Google Analytics is Javascript based so there is more to pull from than simply the reported user-agent. You can tell when a site is saved as a home screen web app for example by checking the window.navigator.standalone
property. I unsuccessfully explored the window.navigator
object with the various in-app browsers to see if I could shake out their names. If your app has a UIWebView and you don’t customize its user-agent (like you see Google did with Chrome–CriOS) there doesn’t appear to be a way to categorize the traffic. That’s too bad, I’d like to know what apps people are using.
Could you give an example of a user that would register as a safari (in-app) visit on a site? Because iPhones would be Safari right? I don’t see how someone could access my site through an app.
It’s 2015 almost 2016 and I am still a little lost on this. I assume now that this specifically refers to our website being opened on an Iphone app? Probably Safari browser or similar?
How I understand it is you are using an iPhone app like facebook, you click on a link in facebook, it doesn’t take you out of facebook, but instead takes you to a browser view within facebook. This would be Safari (in-app) session.
Here’s an example we’ve seen: user opens an email (containing GA tracking code which logs it as an event) in an iPhone email app, then clicks “open in browser,” which launches Safari.