Set Tag Name
Set tag name for a mobile view
To simplify management of privacy for mobile applications and to enable individuals who have worked with Fullstory for the web to have a more familiar experience, Fullstory for Mobile Apps instrumentation creates virtual HTML-like elements for native Android or iOS views for the purposes of privacy management, funnel definition, and searches. read more here
By default, the tag name is mapped from the class name of the native view in Android or iOS.
(Usually RCTView
or ReactViewGroup
for React Native apps.)
Set the fsTagName
property on any component to set a custom tag name for the native view that backs it.
Set Tag Name Automatically
Since: @fullstory/babel-plugin-annotate-react 2.3.0
Use @fullstory/babel-plugin-annotate-react with the setFSTagName setting enabled to automatically set the fsTagName
attribute to the component name for most React Native components.
This is recommended for new deployments, but caution should be exercised when updating existing deployments, as the change may cause pre-existing privacy rules, defined elements, etc. to stop working.
Additional Information
// Instead of setting the tag name via an FS API method,
// use the fsTagName property that Fullstory's babel plugin adds to every React Native View.
<Text fsTagName="custom-tag-name">Text element with a custom tag name</Text>
see fullstory-react-native for more details
Example Invocation
Instead of invoking an FS API method, set the fsTagName
property:
<Button fsTagName="CartButton">Cart</Button>