Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Map<String, String> dimensions = new HashMap<String, String>();
- dimensions.put("instant", "afterMatch");
- trackEvent(EVENT_FRIENDS_ADD, dimensions);
- /* .... */
- public static void trackEvent(String evType, Map<String, String> evDim) {
- Date now = new Date();
- Map<String, String> commonDim = new HashMap<String, String>();
- commonDim.put("locale", GeneralUtils.getLanguageISO());
- commonDim.put("weekday", GeneralUtils.getWeekPeriod(now));
- commonDim.put("timeOfTheDay", GeneralUtils.getDayPeriod(now));
- if (evDim == null) evDim = new HashMap<String, String>();
- evDim.putAll(commonDim);
- ParseAnalytics.trackEvent(evType, evDim); // sometimes this throws the exception
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement