Tracking wrapped web pages in mobile apps | Community
Skip to main content
Level 4
October 4, 2023
Question

Tracking wrapped web pages in mobile apps

  • October 4, 2023
  • 1 reply
  • 2720 views

Our developers are looking at including wrapped web pages (with the Adobe Analytics JavaScript tags on them) in our mobile app.  Is there documentation that shows how to make sure they are included in the mobile app tracking?

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

1 reply

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
October 4, 2023

So this is an interesting, and unfortunately tied specifically to your custom implementation scenario; so there's no real documentation....

 

The thing is, mobile app tracking has metrics like App Version and Lifecycle metrics which cannot be a part of your web JS tracking... but I understand that logically you would want to track those pages within your own "App traffic" definitions....

 

First, I assume you are passing the ECID values from the app to the webview pages, and that your website is reading those parameters and making sure to identify the user as the same ID.

 

Now, there are different ways to do this, but it would still be customized...

 

There are different ways to identify this.. you could use a custom parameter passed on Webviews to indicate that your App was loaded within the app (this of course might end up getting shared as a link which would impact your ability to track reliably).

 

Here is what I use, but it's a bit more involved. I actually used a trick used by a lot of social media apps, I had our developers append a custom value to the User Agent within the app. Basically, all webviews through an app use your default browser to render the content (the content will be identified as that browser / OS)... appending to the end a value like "[my app]" doesn't change how Adobe / Google / etc identify the app, but you can actually create a rule to check for "[my app]" and code in special tracking for anything loaded in this scenario. If on your website you see this User Agent variation, you can set a dimension that you use in segmentation to identify web from app (however you are determining that)

aablank1Author
Level 4
October 4, 2023

Thanks for that answer.  I especially like the user agent alteration.  We have a different report suite for web and mobile app.  I'd like to change between them depending on user agent.

 

I'm not as familiar with web views.  Would the tracking be the same if the web pages were "sliced" so that they don't have the navigation or footer?  The screen template essentially frames in the main part of each page.  I'm wondering if (conceptually) web views are that easy.

 

 

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
October 4, 2023

Trying to switch the tracking suite programatically can be done, but this can become a potential failure point... personally I wouldn't separate the tracking between web and apps... that is really just making your life harder when you need to pull overall stats (it's easier to segment data than to roll it up - Adobe's "rollup suites" don't work great, they were the solution many many years ago, they no longer recommend them for most implementations).

 

I use a Global Suite model (rolling 30+ sites, 3 apps, and many companion sites) into one suite, then use Virtual Suites to segment to "Core Web", "Mobile App", "AMP", etc for each site... allowing me to pull the subset of data that is needed, or all the data combined. But ultimately, the choice is yours in how you want to track and separate our your data.

 

If you do want to go the direction of separate suites, you will have to modify your web tracking in one of two ways....

 

Use Adobe Launch to detect the use of the "app webview" as above, and change the tracking accordingly to set the s_account value to the correct suite... or you can get your developers to detect it, and load a different Adobe Launch property onto the webpage that is set up to track to your mobile app suite (again, some core tracking elements like App Versions and Lifecycle metrics will not be included in any data collected this way)

 

As for your question

would the tracking be the same if the web pages were "sliced" so that they don't have the navigation or footer? 

That is completely up to how your developers coded it... if you devs are hiding content such as the footer, then it sounds like they are already passing something to the page to tell it to load differently... you might be able to leverage that... or as above, as the developers to change the Launch property in that scenario.

 

Our webviews don't do anything special, no hiding of elements, no change it logic... they could if we wanted to... but since we have so few, most of our pages are built right into the app (at least in our more recent apps, older versions, may not have the pages and open as webview), so most webviews are of external sites; and my detection within our site allows me to record it appropriately.