Event Tags

Event Tags Method

Best Practices/Scenarios

You can leverage Event Tags (addTag) capability to pass any (and any number of) custom attributes. Event Tags are user-friendly and versatile method. You can filter events by a user-friendly attribute name in the TUNE dashboard. The following are possible scenarios and recommendations for best practices. If you are:

  • Only Using AA - Must use attribute{1-5} or the data does not appear in the dashboard.
  • Only Using IAM - Use Event Tag capability and not use the attribute{1-5}.
  • Using both AA and IAM - Use Event Tag capabilities in addition to attribute{1-5}.

The Event Tags can be attached to any existing event.

Examples

The type of tag selected (i.e. withTagAsString vs withTagAsNumber) dictates which segmentation operators are available within the platform. For example, the “greater than” operator would not be available to attributes passed as strings.

iOS

The following is an example of an iOS event:

TuneEvent *event = [TuneEvent eventWithName:TUNE_EVENT_PURCHASE];
event.refId = @"ref13571";
event.revenue = 13.97;
event.currencyCode = @"USD";
[Tune measureEvent:event];

Here is the same example of an iOS event with an Event Tag:

TuneEvent *event = [TuneEvent eventWithName:TUNE_EVENT_PURCHASE];
event.refId = @"ref13571";
event.revenue = 13.97;
event.currencyCode = @"USD";
[event addTag:@"product_name" withStringValue:self.product.name];
[Tune measureEvent:event];

For iOS:
https://github.com/TuneOSS/sdk-release/blob/master/sdk-ios/Tune/Tune/TuneEvent.h
In-App Marketing supports: withStringValue, withDateTimeValue, withNumberValue

Android

The following is an example of an Android event:

tune.measureEvent(new TuneEvent(TuneEvent.PURCHASE)
                                  .withEventItems(eventItems)
                                  .withRevenue(0.99)
                                  .withCurrencyCode("USD")
                                  .withAdvertiserRefId("12999748531"));

Here is the same example of an Android event with an Event Tag:

tune.measureEvent(new TuneEvent(TuneEvent.PURCHASE)
                                  .withEventItems(eventItems)
                                  .withRevenue(0.99)
                                  .withCurrencyCode("USD")
                                  .withAdvertiserRefId("12999azzzx748531")
                               .withTagAsString(“product_name”,”Toy Car”));

For Android:
https://github.com/TuneOSS/sdk-release/blob/master/sdk-android/TuneMarketingConsoleSDK/src/main/java/com/tune/TuneEvent.java
In-App Marketing supports: withTagAsString, withTagAsNumber (int/double/float), withTagAsDate

Have a Question? Please contact support@tune.com for technical support.