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
  • 2683 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.

 

 

aablank1Author
Level 4
August 14, 2024

Ah Gotcha, you are just using the third party system to implement a "traditional" host JS files, set the variables and sent the tracking!

 

thought that the Visitor ID service was supposed to automatically set the ECID cookie based on the passed value, but someone else was having issue with that just recently... 

 

You could try to create some custom code to overwrite the s_ecid cookie manually... you just have to make sure that code runs before your tracking occurs.....


Would appendVisitorIDsTo () work in this instance?

https://experienceleague.adobe.com/en/docs/id-service/using/id-service-api/methods/appendvisitorid

(we're kind of out of my wheelhouse with this, but it seems to keep turning up when I search on this topic)