Skip to content

1.2 AotterTrek Tracker

superwave edited this page Aug 14, 2019 · 3 revisions
  1. engage entity when enter the post
[[ATTracker sharedAPI] ATTrackEngageEntityWithId:@"<entity id>" //required
                         title:@"<title>"
                         type:<ATTrackerType>
                     reference:@"<reference>"
                           url:@"<url>"
                      coverImg:@"<cover image url>"
                 publishedDate:[NSDate date]
                    categories:@[@"tech", @"news"]];

example.

 [[ATTracker sharedAPI] ATTrackEngageEntityWithId:@"testPostId"
                                                type:ATTrackerTypePOST
                                               title:@"im  atitle"
                                           reference:@"test-reference"
                                                 url:@"http://agirls.aotter.net"
                                            coverImg:@"http://placehold.it/300x300"
                                       publishedDate:[NSDate date]
                                          categories:@[@"imCategoryTest"]];

entity

Variable Type description
id String required field
title String
reference String
url String
img String
publishedDate NSDate
categories NSArray<NSString *>
ATTrackerType enum POST, PLACE, GAME, VIDEO, MUSIC
  1. exist entity when leave the post (optional)
[[ATTrack sharedAPI] ATTrackExitEntityWithId:@"<entity id>"]; // required
  1. send entities at any time
[[ATTracker sharedAPI] ATTrackSend];