-
Notifications
You must be signed in to change notification settings - Fork 90
[iOS] Analytics Screen #1793
Comments
👋 @mateusforgi |
Hi @mateusforgi, Thank you for contributing with Beagle and for the thorough explanation on the issue. We will be on that asap. |
this is a fact that could be discussed with the beagle core and explained better in the documentation since there are scenarios that use the identifier and others the url, it would be better to define a pattern and both platforms follow |
scenarios that all this gets complicated and it's good to be discussed: if you use in the analytics provider the identifier of the view and not the URL, when I use the navigation should it be the URL or identifier to go back to the back screen? |
The correct behavior of this features is:
I just checked the behavior of Web and Flutter and they're both implemented just like iOS. Android is actually the one with the unexpected behavior. If the screen id is important to you, we can add a new field to the ScreenRecord named @mateusforgi Is it important for you to have the |
@uziassantosferreira the screen identifier would be the best solution for us. I am afraid that returning the remote URL can be described as a vulnerability as some mobile apps use encrypted URLs to avoid leaking the real URL. @Tiagoperes the |
@mateusforgi if the URL is encrypted in the backend and decrypted in your HttpClient, this won't be a problem, because only the encrypted URL would be exposed. In any case, you shouldn't base any security in the URL, no matter how much you try to hide it, it will always be visible for anyone inspecting the connection. For instance, any Android rooted device can see all the network traffic, just like you can check the network tab in a web browser. |
@Tiagoperes When the navigation happens through a Beagle action it exposes the path not encrypted, right? I haven't done this test yet, but I noticed beagle only returns the path as the remote URL in that case to analytics. Anyway, can you give a direction if the |
@mateusforgi I suggest we follow up with Tiago's idea, I have changed our web core to show you what the final payload would look like: What's new:
Does it cover the case for your? If so, I will add it to our backlog to be worked on all platforms. |
@hectorcustodiozup the |
We are going to add this in the next release @mateusforgi. If there's any field in the final record you don't want to use, remember it goes through your analytics provider method |
@carlossteinzup @hectorcustodiozup can you guys implement this feature in iOS and Android? |
@Tiagoperes Awesome! Thank you! |
@Tiagoperes @mateusforgi. Last week I could not work on this, but this one I will try to finish Web and add the changes for both iOS and Android. |
Description
On Beagle 1.10.1, the implementation for the analytics screen record is returning the remote url of the screen instead of the view controller identifier. This implementation is different from android where beagle is returning the identifier.
Android code:
https://github.com/ZupIT/beagle-android/blob/812a330777edd79a123495e9f678dc8f25a019f7/beagle/src/main/kotlin/br/com/zup/beagle/newanalytics/AnalyticsService.kt#L52
iOS code:
https://github.com/ZupIT/beagle-ios/blob/c44542d54f38a83bd935d5a66f0962b278745675/Sources/Beagle/Sources/Analytics/Service/RecordFactory.swift#L69
Steps To Reproduce
Create a remote screen. Example: BeagleScreenViewController(.remote(.init(url: "http://localhost:8080/timeline")))
Set the analyticsProvider on Beagle.dependencies.analyticsProvider
Create record will be called with the screen variable as the remote url, instead of the screen identifier.
Expected Results
Create record should be called with the screen identifier on the screen variable.
Code example, screenshot, or link to a repository:
The text was updated successfully, but these errors were encountered: