To use the additional parameters of the custom events for targeting purposes, they must formatted as a valid json string. Use a timestamp to represent a date.
If you want to track a specific event :
Where 1000 is the eventId.
It is possible to build custom events and track them via the following method : Accengage.TrackCustomEvent(long type, dictionary<string, object> parameters);
CustomEvent type is supposed to be a number strictly higher than 1000 (long-typed).
CustomEvent parameters are designed to be a dictionary composed of key/value couples.
Keys are strings regardless of whether you are on iOS or Android
On the other hand, values type change depending on whether you are on iOS or Android platform.
You can track specific events like “Add to Cart”, “Purchase” and “Lead”. Here is how to use each of these events.
TrackLead("lead label", "lead value");
First of all you will need to create an Item using the AccengageItem class.
AccengageItem accengageItem = new AccengageItem("idItem","labelItem","categoryItem",19.50,"EUR",1)
Currency should be a valid 3 letters ISO4217 currency (EUR,USD,..) and the 2 last arguments are price and quantity
Now you just have to add it to the Cart.
TrackCart("cartId", accengageItem, "EUR");
TrackPurchase("purchaseId", "EUR", 19.5, listItem);
You can create a device profile for each device in order to qualify the profile (for example, registering whether the user is opt in for or out of some categories of notifications).
A device profile is a set of key/value that are uploaded to Accengage server. In order to update information about a device profile, add the following lines to your code:
Where listUdi is a List<KeyValuePair<string, string>> containign all the informations to update.
You have the ability to use update device information using the following method : public static void UpdateDeviceInformation(string action, string key, object value);
Action are string-typed. Possible values are “set”, “delete”, “increment” and “decrement”. Using other values would be ineffective.
Subscription tag is a new API used to mark user interest for a particular topic : public static void SetDeviceTag(string category , string identifier, Dictionary<string, object> parameters)
A device tag can contain up to 5 parameters and all parameter key should be different.
As mentionned with the name of the method, setDeviceTag is an update of the Subscription Tag, it will override then the previous information.
You can set an expiration date for your Subscription Tag by adding the parameter "exp" to the Device Tag where the value is a timestamp for the expiration date :
parameters["exp"] = "1543512073";
You can unsubscribe a user to a particular topic with the following code :
You can identify each views of your application that the SDK can refer to using.
where MyView is the name of your view.
This method must take place in the viewDidAppear and is to be used with TrackScreenDismiss in the viewDidDisappear. Look the Documentation.