-
Notifications
You must be signed in to change notification settings - Fork 0
On site ads 521c4e
AT Internet’s SDK offers the measurement of your in-app ads so that you can evaluate their performance.
The goal is to measure “clicks” and impressions of self-promotion ad campaigns, as well as third-party campaigns displayed on your app, and then analyse this information.
To be sure to measure properly the Auto-Promotion campaign, please check if your campaign is declared in Settings > Marketing campaigns.
Once your tag is initialised, you can start tagging your in-app ads.
Dans le cas d’un projet Swift, veillez à importer le module SmartTracker (ou tvOSTracker / watchOSTracker si votre target est une Apple TV / Apple watch) dans votre ViewController. Dans le cas d’un projet Objective-C, veillez à importer les entêtes SmartTracker-Swift.h
To tag your ads, the tracker exposes two properties, publishersand selfPromotions, according to the type of ad to be measured.
These two properties themselves expose two methods:
- add
- sendImpressions
The addmethod allows you to add an ad tag and put it in standby for send. This method returns an object with type Publisheror SelfPromotionaccording to the case in question.
To send the defined information, you must call the sendTouchor sendImpressionmethod of your object, based on the type of action taken by the user, or call the Tracker�s dispatchmethod.
Please note, calling the methods sendTouch and sendImpression modifies the object’s action property.
The sendImpressionsmethod allows sending of all information for ads whose action is defined as Impression.
-
Tagging an ad impression for a third-party
import UIKit
import Tracker
class ViewController: UIViewController {
let tracker: Tracker = ATInternet.sharedInstance.defaultTracker
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewWillAppear(animated: Bool) {
tracker.publishers.add("[ad1]").sendImpression()
}
}#import "ViewController.h"
#import "SmartTracker/SmartTracker-Swift.h"
@interface ViewController ()
@property (nonatomic, strong) Tracker* tracker;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[[self.tracker.publishers add:@"[ad1]"] sendImpression];
}
@end-
Tagging an ad �click� for a third-party
@IBAction func touchAd(sender: UIButton) {
ATInternet.sharedInstance.defaultTracker.publishers.add("[ad1]").sendTouch()
}- (IBAction)touchAd:(UIButton *)sender {
[[[ATInternet sharedInstance].defaultTracker.publishers add:@"[ad1]"] sendTouch];
}-
Tagging a self-promotion campaign impression
import UIKit
import Tracker
class ViewController: UIViewController {
let tracker: Tracker = ATInternet.sharedInstance.defaultTracker
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewWillAppear(animated: Bool) {
tracker.selfPromotions.add(1).sendImpression()
}
}#import "ViewController.h"
#import "SmartTracker/SmartTracker-Swift.h"
@interface ViewController ()
@property (nonatomic, strong) Tracker* tracker;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[[self.tracker.selfPromotions add:1] sendImpression];
}
@end-
Tagging an self-promotion campaign �click�
@IBAction func touchAd(sender: UIButton) {
ATInternet.sharedInstance.defaultTracker.selfPromotions.add(1).sendTouch()
}- (IBAction)touchAd:(UIButton *)sender {
[[[ATInternet sharedInstance].defaultTracker.selfPromotions add:1] sendTouch];
}-
Tagging several ads and sending impressions
50 impressions per page maximum
import UIKit
import Tracker
class ViewController: UIViewController {
let tracker: Tracker = ATInternet.sharedInstance.defaultTracker
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewWillAppear(animated: Bool) {
let ad1 = tracker.publishers.add("[ad1]")
ad1.creation = "[creation]"
ad1.variant = "[variant]"
ad1.format = "[120x40]"
ad1.generalPlacement = "[generalPlacement]"
ad1.detailedPlacement = "[detailedPlacement]"
ad1.advertiserId = "1[advertiserId]"
ad1.url = "[http://avertiser-url.com]"
tracker.publishers.add("[ad2]")
let ad3 = tracker.publishers.add("[ad3]")
ad3.creation = "[creation]"
ad3.variant = "[variant]"
tracker.publishers.sendImpressions()
}
}#import "ViewController.h"
#import "SmartTracker/SmartTracker-Swift.h"
@interface ViewController ()
@property (nonatomic, strong) Tracker* tracker;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.tracker = [ATInternet sharedInstance].defaultTracker;
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
Publisher *ad1 = [self.tracker.publishers add:@"[ad1]"];
ad1.creation = @"[creation]";
ad1.variant = @"[variant]";
ad1.format = @"[120x40]";
ad1.generalPlacement = @"[generalPlacement]";
ad1.detailedPlacement = @"[detailedPlacement]";
ad1.advertiserId = @"1[advertiserID]";
ad1.url = @"[http://avertiser-url.com]";
[self.tracker.publishers add:@"[ad2]"];
Publisher *ad3 = [self.tracker.publishers add:@"[ad3]"];
ad3.creation = @"[creation]";
ad3.variant = @"[variant]";
[self.tracker.publishers sendImpressions];
}
@end-
Tagging several self-promotion campaigns and sending impressions
import UIKit
import Tracker
class ViewController: UIViewController {
let tracker: Tracker = ATInternet.sharedInstance.defaultTracker
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewWillAppear(animated: Bool) {
let sp1 = tracker.selfPromotions.add(1)
sp1.format = "[120x40]"
sp1.productId = "p1"
tracker.selfPromotions.add(2)
let sp3 = tracker.selfPromotions.add(3)
sp3.productId = "p3"
tracker.selfPromotions.sendImpressions()
}
}#import "ViewController.h"
#import "SmartTracker/SmartTracker-Swift.h"
@interface ViewController ()
@property (nonatomic, strong) Tracker* tracker;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.tracker = [ATInternet sharedInstance].defaultTracker;
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
SelfPromotion *sp1 = [self.tracker.selfPromotions add:1];
sp1.format = @"[120x40]";
sp1.productId = @"p1";
[self.tracker.selfPromotions add:2];
SelfPromotion *sp3 = [self.tracker.selfPromotions add:3];
sp3.productId = @"p3";
[self.tracker.selfPromotions sendImpressions];
}
@end-
Tagging self-promotion ads and campaigns and using dispatcher
import UIKit
import Tracker
class ViewController: UIViewController {
let tracker: Tracker = ATInternet.sharedInstance.defaultTracker
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewWillAppear(animated: Bool) {
tracker.publishers.add("[ad1]")
tracker.publishers.add("[ad2]")
tracker.selfPromotions.add(1)
// This will send one hit with publishers and selfpromotion impressions
tracker.dispatch()
}
}#import "ViewController.h"
#import "SmartTracker/SmartTracker-Swift.h"
@interface ViewController ()
@property (nonatomic, strong) Tracker* tracker;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.tracker = [ATInternet sharedInstance].defaultTracker;
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.tracker.publishers add:@"[ad1]"];
[self.tracker.publishers add:@"[ad2]"];
[self.tracker.selfPromotions add:1];
// This will send one hit with publishers and selfpromotion impressions
[self.tracker dispatch];
}
@end-
Tagging self-promotion ads and campaigns and adding screen information
import UIKit
import Tracker
class ViewController: UIViewController {
let tracker: Tracker = ATInternet.sharedInstance.defaultTracker
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewWillAppear(animated: Bool) {
tracker.publishers.add("[ad1]")
tracker.publishers.add("[ad2]")
tracker.selfPromotions.add(1)
tracker.screens.add("Home").sendView()
}
}#import "ViewController.h"
#import "SmartTracker/SmartTracker-Swift.h"
@interface ViewController ()
@property (nonatomic, strong) Tracker* tracker;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.tracker = [ATInternet sharedInstance].defaultTracker;
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.tracker.publishers add:@"[ad1]"];
[self.tracker.publishers add:@"[ad2]"];
[self.tracker.selfPromotions add:1];
[[self.tracker.screens add:@"Home"] sendView];
}
@end-
Tagging a screen impression
import UIKit
import Tracker
class ViewController: UIViewController {
let tracker: Tracker = ATInternet.sharedInstance.defaultTracker
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewWillAppear(_ animated: Bool) {
let screen = tracker.screens.add("Home")
_ = screen.publishers.add("[ad1]")
screen.sendView()
}
}#import "ViewController.h"
#import "SmartTracker/SmartTracker-Swift.h"
@interface ViewController ()
@property (nonatomic, strong) Tracker* tracker;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.tracker = [ATInternet sharedInstance].defaultTracker;
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
Screen *screen = [[self.tracker screens] add:@"Home"];
[screens.publishers add:@"[ad1]"];
[screen sendView];
}
@end-
Data API
- Data flow
- Advice optimizations data flow
- Error codes data flow
- Faq data flow
- General information data flow
- Technical information data flow
- Reporting API v3
- Getting started
- Methods
- Parameters
- Technical information
- REST API
- Campaigns
- Custom variables
- Getting started rest
- Methods rest
- Response structure parameters rest
- Fixed periods
- Parameters compatibility
- Relative periods
- Structure of the response
- “code” parameter
- “columns” parameter
- “evo” parameter
- “filter” parameter
- “include” parameter
- “lng” parameter
- “max-results” parameter
- “page-num” parameter
- “period” parameter
- “period” parameter: “H” v. “He” & “MN” v. “MNe”
- “retention” parameter
- “segmentdesc” parameter
- “segment” parameter
- “sep” parameter
- “sort” parameter
- “space” parameter
- Technical specifications rest
- Data flow
-
Data collection
- Android
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Users
- Apple
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Users
- General
- Cddc renew staging process
- Changelog
- Craft your hit
- Encoded parameters
- Server side cookie management
- Supported taggings
- Tagging deletion
- Utilisation of dispatch sdks
- JavaScript
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Partners javascript
- Users
- Piano Analytics
- Event tagging piano analytics
- Getting started piano analytics
- Piano analytics tagging
- Feeding piano analytics with as2 tagging
- Tagging custom properties sdk
- Android