Commit a6f82c6d authored by Bosko Petreski's avatar Bosko Petreski Committed by Bosko Petreski

improvements

parent 2248cb41
......@@ -59,7 +59,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="tc2-Qw-aMS" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="304.80000000000001" y="432.23388305847078"/>
<point key="canvasLocation" x="-185" y="430"/>
</scene>
</scenes>
</document>
......@@ -19,7 +19,7 @@
#pragma mark - IBActions
-(IBAction)onBtnMakeConvert:(UIButton *)sender{
// Make conversion
[Primed.sharedInstance convert:@"RUUID_GO_HERE"];
// [Primed.sharedInstance convert:@"RUUID_GO_HERE"];
// Make conversion with data
NSDictionary *dictData = @{@"device": @"iphone",
......@@ -56,12 +56,12 @@
[super viewDidLoad];
// Create Primed instance
// [Primed.sharedInstance initWithPublicKey:@"mypubkey" secretKey:@"mysecretkey" connectionString:@"https://gw.staging.primed.io:443"];
// Primed.sharedInstance.debug = YES;
[Primed.sharedInstance initWithPublicKey:@"mypubkey" secretKey:@"mysecretkey" connectionString:@"https://gw.staging.primed.io:443"];
Primed.sharedInstance.debug = YES;
// Create PrimedTracker instance
PrimedTracker.sharedInstance.debug = YES;
[PrimedTracker.sharedInstance initWithPublicKey:@"mypubkey" secretKey:@"mysecretkey" connectionString:@"https://gw.staging.primed.io:443" trackingConnectionString:@"http://18.191.69.104:5001/v1" heartbeatInterval:10 eventQueueRetryInterval:10];
// PrimedTracker.sharedInstance.debug = YES;
// [PrimedTracker.sharedInstance initWithPublicKey:@"mypubkey" secretKey:@"mysecretkey" connectionString:@"https://gw.staging.primed.io:443" trackingConnectionString:@"http://18.191.69.104:5001/v1" heartbeatInterval:10 eventQueueRetryInterval:10];
}
-(void)didReceiveMemoryWarning{
[super didReceiveMemoryWarning];
......
......@@ -166,6 +166,12 @@
NSString *strUrl = [NSString stringWithFormat:@"/api/v1/conversion/%@",ruuid];
[self post:data onURL:strUrl success:^(NSDictionary *response) {
if(Primed.sharedInstance.primedTrackerAvailable){
[PrimedTracker.sharedInstance trackConvert:@{@"ruuid":ruuid,
@"data":response
}];
}
} failed:^(NSString *message) {
}];
......
......@@ -119,4 +119,10 @@ typedef NS_ENUM(NSUInteger, ScrollDirection) {
*/
-(void)trackPersonalise:(NSDictionary *)data;
/**
* Track convert JSON respond from REST
* @param data Convert JSON Data for event
*/
-(void)trackConvert:(NSDictionary *)data;
@end
......@@ -54,7 +54,7 @@
@"sdkId":@(1),
@"sdkVersion":@"2.1.0-beta12",
@"type":type.uppercaseString,
@"eventObject":(eventObject ?: @{})
@"eventObject":(eventObject ?: @{})
}];
return payload;
......@@ -202,5 +202,9 @@
NSDictionary *payload = [self basicEventProperties:@"personalise" eventObject:data];
[self emitPayload:payload];
}
-(void)trackConvert:(NSDictionary *)data{
NSDictionary *payload = [self basicEventProperties:@"convert" eventObject:data];
[self emitPayload:payload];
}
@end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment