Once data is uploaded, it can't be deleted, so it's a good idea to create a test app in Localytics and use it to perfect your instrumentation. Then you can switch the app key to the production app.

Initialize Localytics SDK on your app start with the Init method. 


Tag events

When an interesting event occurs in your  application, tag it using these instructions.

Be sure to predefine your events as final static Strings for performance reasons, data actionability, and to avoid collecting any personally identifiable information. Avoid calling this function in a loop so that you don't collect too much data.

You may want to collect additional data about some events, such as how many lives the player has, or what the last action the user took was before clicking on an advertisement. This is accomplished with the second form of TagEvent, which takes a map of key/value pairs, or attributes, along with the event name.

Tag a single event with no attributes by adding the following linex of code, where “Options Saved” is a string describing the event.

private const string TAG_OPTIONS_SAVED = "Options Saved";
public void optionsSaved() {

If you want to add attributes, modify the tag as follows.

private const string TAG_OPTIONS_SAVED = "Options Saved";

public void optionsSaved() {
	Dictionary<string, string> attributes =  new Dictionary<string, string>();
	attributes.Add("age", "16");
	attributes.Add("sex", "male");
	LocalyticsUnity.Instance.TagEvent(TAG_OPTIONS_SAVED, attributes);

Tracking user flow through your app

Tag views, or screens, in your application in order to track the way users flow through it.  To tag views, add a TtagScreen call after new scene was loaded call for each of your views. As with events, don't name each screen dynamically. For example, a screen displaying an article should be tagged simply as Article, rather than with the article's title.


Customer ID

Localytics provides a set of customer-based parameters to more easily attach internal customer identifiers to every session open, session closed, and event. Be sure you're sending Customer ID so that you can get the most out of Localytics' targeting features.

In general, two identifying parameters are available. Use CustomerID to set a unique identifier for each individual customer. To attach other types of parameters, use SetIdentifier.

LocalyticsUnity.Instance.SetIdentifier("hair_color", "black");

Setting Special Profile IDs via the SDK

Special Profile IDs are "special" attribute names, like $email, that Localytics recognizes and validates for use in email campaigns and otherMarketing features. They are also available in the AWS S3 JSON data exports.

Important: This is the only way you should send this type of customer information to Localytics.

// Customer ID
// First name
// Last name
// Full name
LocalyticsUnity.Instance.SetCustomerFullName("Mohana Aggarwal");	
// Customer email

Custom dimensions

Custom dimensions make it possible to split data (such as users, sessions, devices, and countries) in the Dashboard by additional dimensions specific to the application. They are available in many Localytics Dashboard reports.

If you're not sure what custom dimensions to tag, here are a few recommendations.

  • Age (10,18,24,35,56)
  • Gender (male, female)
  • Logged In Status (signed in, not signed in)
  • Merchant Type (buyer, seller)
  • Net Promoter Score (neutral, positive, negative)
  • Number of Friends (1,5,10,100)
  • Pirated (yes, no)
  • Push Notifications (on, off)
  • Registration Status (unregistered, email, facebook)
  • Shopper Type (never bought, bought few times, bought many times)
  • Subscription Type (free, trial, paid)
string custom_dimension_1 = "Trial";
string custom_dimension_2 = "Adult";
LocalyticsUnity.Instance.SetCustomDimension(0, custom_dimension_1);
LocalyticsUnity.Instance.SetCustomDimension(1, custom_dimension_2);