Skip to content

Instantly share code, notes, and snippets.

@mbiermann
Created February 3, 2014 12:10
Show Gist options
  • Save mbiermann/8782808 to your computer and use it in GitHub Desktop.
Save mbiermann/8782808 to your computer and use it in GitHub Desktop.
Tracking an action with the Trademob Tracking SDK (v2.0-beta)
#import <Trademob/TMTracker.h>
// Import here is for convenience. Following these docs (http://goo.gl/QtSkAL)
// better have this in your compilation prefix
@implementation TMSomeRandomController : NSObject
- (void)anyRandomMethod {
// Generate an action info hash that contains any domain-specific key-value
// pairs and an integer typed value
NSDictionary *info = @{
@"user_id": @"anywho",
@"stuff_id": @"anywhat",
@"value": @1299
};
// Call the Trademob Tracker singleton to track the action and its info hash
[TMTracker track:@"foobar_action" info:info];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment