The identifier associated with each widget in your app is the concatenation of the list of its ancestors in the Flutter tree view.
Here we have an example of the widget tree of a Flutter app:
You may always want to use the same id for this widget, even if you publish a new version of the app in which it has been moved in the tree view.
Reliable Target for a widget enables the analysis of data across various
Snapshots from different dates and versions, including layouts or different A/B testing variations.
Here are examples of how the
Reliable Targets feature can be used:
- Tracking elements that can dynamically move on a page (e.g., Customizable profile page).
- Tracking elements that you want to monitor from one version to another, even if their position changes (e.g., Moving carousel position from top to bottom).
- Tracking elements during A/B testing (e.g., Testing new and old Product page on the same version).
- Tracking elements that can be used on multiple pages (e.g., Search bar).
- Ensuring that a call to action has a unique identifier wherever it appears on a screen (e.g., AddtoCart button).
Contentsquare Flutter SDK provides a
ReliableTarget widget that can be used to wrap the widget you want to track reliably.
ReliableTarget accepts a mandatory
name argument that allows the identification of the component to track.
Here is an example of how to use it with the code above:
namemust be unique to effectively use the feature
nameshould NOT be empty
namefor the same
ReliableTargetmust be the same across different versions of the app