You can tag users/devices from your SDK in one line of code.


The SDK looks after the details for the device, you just supply the tag key and value:

  • The tag name (key) is what you want to call it. In the example below "Plan-49" is how you will see this in the Pointzi Dashboard.
  • Pointzi supports tags of: string, numeric and datetime. In the example below, the value for "Plan-49" is "Trial-Period".


String Tags

OBJECTIVE-C

[StreetHawk tagString:@"Trial-Period" forKey:@"Plan-49"];


SWIFT

let key = "Plan-49"
let string_value = "Trial-Period"
SHApp.sharedInstance().tagString(string_value, forKey: key)



Numeric Tags


OBJECTIVE-C

NSString *key = @"BidValue";
NSInteger numeric_value = 549;
[StreetHawk tagNumeric:numeric_value forKey:key];



SWIFT

let key = "BidValue"
SHApp.sharedInstance().tagNumeric(549, forKey: key)



Datetime Tags

OBJECTIVE-C

// Tagging using predefined StreetHawk tag.</span>
NSString *key = @"sh_registered";
NSDate *datetime_value = [NSDate date];
[StreetHawk tagDatetime:datetime_value forKey:key];

// Tagging using custom tag</span>
NSString *key = @"Birthday";
NSDate *datetime_value = [NSDate date];
[StreetHawk tagDatetime:datetime_value forKey:key]; <span spellcheck="true">// string Date time value in UTC</span>


SWIFT

// Tagging using predefined StreetHawk tag.
let key = "sh_registered"
let datetime_value = NSDate()
SHApp.sharedInstance().tagDatetime(datetime_value, forKey: key)
        
// Tagging using custom tag
let key = "Birthday"
let datetime_value = NSDate()
SHApp.sharedInstance().tagDatetime(datetime_value, forKey: key) // string Date time value in UTC



Other Tag Operations


Increment Tag Value   

OBJECTIVE-C

NSString *key = @"PageVisited";
[StreetHawk incrementTag:key];


SWIFT

let key = "PageVisited"
SHApp.sharedInstance().incrementTag(key)


 

Remove Tag 

OBJECTIVE-C

NSString *key = @"RemoveUser";
[StreetHawk removeTag:key];


SWIFT

let key = "RemoveUser"
SHApp.sharedInstance().removeTag(key)