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 view in Android or iOS.
Call FS.setTagName
to set a custom tag name for a mobile view.
Note: setTagName
is supported on UIKit UIView
s (in both Swift and Objective-C), but not on SwiftUI View
s.
Additional Information
- Objective-C
- Swift
[FS setTagName:(UIView *)view tagName:(NSString *)tagName]
[view fsSetTagName:(NSString *)tagName]
Example Invocation
// .h file
@property (nonatomic, retain) IBOutlet UIButton *cartButton;
// .m file
- (void)viewDidLoad {
[super viewDidLoad];
[FS setTagName:self.cartButton tagName:@"CartButton"];
}
FS.setTagName(view: UIView, tagName: String)
Example Invocation
@IBOutlet weak var cartButton: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
FS.setTagName(cartButton, tagName: "CartButton")
}