Developers » AS2 tagging » Apple » Ecommerce » SalesTracker » Visited aisles
Visited aisles
- iOS
- watchOS
- tvOS
Foreword
AT Internets SDK allows you to tag your product aisles or sections.
This is a navigation analysis specific to eCommerce applications enabling you to categorise the different screens proposing your products (latest collection, sales items, etc.). The objective is to have a panoramic view of the aisles your users visit. We consider visited aisles as areas of your site users have visited. It is therefore possible to have aisles like “Todays deals”, “Sales”, “New reductions, “New products”, etc. that contain the same product, depending on how that product is classified (its “category).
Get off to a good start
Once your tag is initialised, you can add information about visited aisles to your screen hit.
In the case of a Swift project, be sure to import the Tracker (or TrackerExtension if your target is an extension) module in your ViewController. In the case of an Objective-C project, be sure to import SmartTracker-Swift.h
Tagging
The tracker makes an aisles property available. This property exposes an add method allowing you to include up to six levels of aisles, and add this information to your screen tagging.
Tagging examples
- Screen tagging with one level of aisles
import UIKit import SmartTracker class ViewController: UIViewController { let tracker: Tracker = ATInternet.sharedInstance.defaultTracker override func viewDidLoad() { super.viewDidLoad() } override func viewWillAppear(_ animated: Bool) { let screen = tracker.screens.add("High Tech") let screen.aisle = Aisle(level1: "10[high_tech]") screen.sendView() } }
#import "ViewController.h" #import "SmartTracker/SmartTracker-Swift.h" @interface ViewController () @property (nonatomic, strong) Tracker* tracker; @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; self.tracker = [ATInternet sharedInstance].defaultTracker; } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; Screen *screen = [self.tracker.screens add:@"High Tech"]; screen.aisle = [[Aisle alloc] initWithLevel1:@"10[high_tech]"]; [screen sendView]; } @end
- Screen tagging with several levels of aisles
import UIKit import Tracker class ViewController: UIViewController { let tracker: Tracker = ATInternet.sharedInstance.defaultTracker override func viewDidLoad() { super.viewDidLoad() } override func viewWillAppear(animated: Bool) { let screen = tracker.screens.add("Laptops") let screen.aisle = Aisle(level1: "10[high_tech]", level2: "20[Computers_network]", level3: "30[Computers]", level4: "40[laptops]") screen.sendView() } }
#import "ViewController.h" #import "SmartTracker/SmartTracker-Swift.h" @interface ViewController () @property (nonatomic, strong) Tracker* tracker; @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; self.tracker = [ATInternet sharedInstance].defaultTracker; } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; Screen *screen = [self.tracker.screens add:@"Laptops"]; screen.aisle = [[Aisle alloc] initWithLevel1:@"10[high_tech]" level2:@"20[Computers_network]" level3:@"30[Computers]" level4:@"40[Laptops]"]; [screen sendView]; } @end
Aisle class
Properties
Name | Type | Default value | Description |
---|---|---|---|
level1 | String? | nil | Gets or sets the first level of aisles |
level2 | String? | nil | Gets or sets the second level of aisles |
level3 | String? | nil | Gets or sets the third level of aisles |
level4 | String? | nil | Gets or sets the fourth level of aisles |
level5 | String? | nil | Gets or sets the fifth level of aisles |
level6 | String? | nil | Gets or sets the sixth level of aisles |