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 "ProductOffer" 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 "ProductOffer" is "Liked".



String Tags

StreetHawk.INSTANCE.tagString("ProductOffer", "Liked" );

 


Numeric Tags

String key  = "BidValue";
double numeric_value = 549.99;
StreetHawk.INSTANCE.tagNumeric(key, numeric_value);   // double numeric_value

  



Datetime Tags

// Example code using reserved keys
String key = "sh_registered";
String datetime_value = "2014-07-25 15:33:20";
StreetHawk.INSTANCE.tagDatetime(key, datetime_value); // string Date time value in UTC

// Example code using custom tag
String key = "Birthday";
String string_value = "2014-07-25 15:33:20";
StreetHawk.INSTANCE.tagDatetime(key, datetime_value);

 

 Alternatively you may use getFormattedDateTime() API to get current time in UTC.   

String key = "ValueSaved";
StreetHawk.INSTANCE.tagDatetime(key, StreetHawk.getFormattedDateTime(System.currentTimeMillis()));

  

Other Tag Operations

Increment Tag Value

String key = "PageVisited";
StreetHawk.INSTANCE.incrementTag(key);

  

Remove Tag  

String key = "RemoveUser";
StreetHawk.INSTANCE.removeTag(key);