Skip to main content

Set Attribute

Set virtual attributes 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

The fsAttribute property is available on any React Native component to create virtual Fullstory attributes.

Set fsAttribute to an object to set custom virtual attributes as key-value pairs on a mobile view.

Additional Information

// Instead of setting the attribute via an FS API method,
// use the fsAttribute property that Fullstory's babel plugin adds to every React Native View.
<Text fsAttribute={{my-attribute-name: "my-attribute-value"}}>Text element with a custom attribute</Text>

see fullstory-react-native for more details

Example Invocation

Instead of invoking an FS API method, set the fsAttribute property:

<Button fsAttribute={{ 'theme-color': 'dark' }}>Cart</Button>