Skip to content

Tagging

  • Tagging customer's unique ID
public void registerUser {
        // Tagging cuid
        StreetHawk.INSTANCE.tagCuid("<USER_UNIQUE_ID");
    }
  • Tagging user's email address
String key = "sh_email";
String string_value = "support@streethawk.com";
StreetHawk.INSTANCE.tagString(key, string_value ); 
  • Tagging user first name
String key = "sh_first_name";
String string_value = "David";
StreetHawk.INSTANCE.tagString(key, string_value );
  • String value
String key = "ProductOffer";
String string_value = "Liked";
StreetHawk.INSTANCE.tagString(key, string_value );
  • Numeric value
String key  = "BidValue";
double numeric_value = 549.99;
StreetHawk.INSTANCE.tagNumeric(key, numeric_value);   // double numeric_value
  • DateTime value
// Example code using custom tag
String key = "Birthday";
String string_value = "2014-07-25 15:33:20";
StreetHawk.INSTANCE.tagDatetime(key, datetime_value); // string Date time value in UTC

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

String key = "ValueSaved";
StreetHawk.INSTANCE.tagDatetime(key, StreetHawk.getFormattedDateTime(System.currentTimeMillis()));
  • Increment Tag Value
String key = "PageVisited";
StreetHawk.INSTANCE.incrementTag(key);
  • Remove Tag
String key = "RemoveUser";
StreetHawk.INSTANCE.removeTag(key);