Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 3.85 KB

analytics.md

File metadata and controls

45 lines (30 loc) · 3.85 KB

Analytics

Starting the Analytics service

In order to use the analytics service you have to make sure it gets started during the API initialization. If you did not specify the analytics behavior in the API initialization method the service will be started automatically if the packages depedencies prerequisite is met. Otherwise this will depends on the value passed as the analyticsAutoStart as true will try to start it and false will keep it turned off and no data will be stored during the session.

Location events

If you have decided to use the analytics service then the user's location will be automatically sent for datamining analysis. In order to avoid internet requests overload location will be aggregated according to a given frequency that can be set in the back office.

Generic events

For any other type of events you would like to keep track of you can use the ISAnalyticsGenericEvent. This event enables you to add up to 2 NSString, 2 int, 2 double, 2 ISPosition and a label to match most cases.

Adding a ISAnalyticsGenericEvent to the ISAnalyticsManager.

ISAnalyticsGenericEvent event = new ISAnalyticsGenericEvent("generic_event");
zoneEvent.setString1("product a");
zoneEvent.setPos1(location.getPosition());
ISAnalyticsManager.getInstance().addGenericEvent(event);

Insiteo's API already trace some basic events among them:

  • Location start and stop
  • Geofence entered, stayed and left
  • Map changes, zone clicks and ISRTO added with ISZonePoi
  • Itinerary requests

Tracking products displayed on map

If you want to trace when a product is added to the map you can use ISMapView#addRTOInZone(ISIRTO, ISZonePoi). This will generate a ISAnalyticsGenericEvent with the String1 set with the external id of the Poi defined in the ISZonePoi.

Completing a generic event

It can be useful in some cases to add information to a ISAnalyticsGenericEvent for that you must set a ISAnalyticsListener that will be notified everytime a new generic event is added. Returning false in this method will dismiss the event.

You missed a thing?