Skip to content

Instantly share code, notes, and snippets.

@pablete
Created February 21, 2015 02:13
Show Gist options
  • Save pablete/963dab48856ebdec85e3 to your computer and use it in GitHub Desktop.
Save pablete/963dab48856ebdec85e3 to your computer and use it in GitHub Desktop.
public void trackGoal(String goalName, String trackingId, Map<String,String> analyticsArguments) {
final Options options = new Options().setAnonymousId(trackingId);
final Props p = new Properties("properties");
for(KeyVal e : analyticsArguments.getKeyVal()) {
p.put(e.key(), e.val())
}
analyticsClient.track("anonymous", goalName, props, options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment