-
Notifications
You must be signed in to change notification settings - Fork 0
Marketing campaigns 9e89f8
AT Internet’s SDK allows you to tag different types of campaigns (ad, affiliation, sponsored links, email marketing).
Once your tag is initialised, you may add campaign information to your screen hit.
In the case of a Swift project, be sure to import the Tracker module in your ViewController. In the case of an Objective-C project, be sure to import the headers SmartTracker-Swift.h
The screen object of the tracker has a campaign property available.
The SDK allows you to manage two modes of campaign “prior attribution”. You can choose to conserve the first or last detected campaign during a definitive period of time via your setup (by default, the first campaign will be conserved). This information will be found in your hit’s xtor variable. To modify the “prior attribution” mode, please proceed as follows:
-
The first detected campaign will be conserved during the time period defined in the setup (30 days by default)
import UIKit
import Tracker
class ViewController: UIViewController {
let tracker: Tracker = ATInternet.sharedInstance.defaultTracker
override func viewDidLoad() {
super.viewDidLoad()
tracker.setConfig(["campaignLastPersistence": "false", "campaignLifetime" : "10"], override: false) { (isSet) -> Void in
print("Campaign configuration is now set")
}
}
}#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;
[self.tracker setConfig:@{@"campaignLastPersistence": @"false", @"campaignLifetime": @"10"} override:NO completionHandler:^(BOOL isSet) {
NSLog(@"%@", @"Campaign configuration is now set");
}];
}
@end-
The last detected campaign will be conserved during the time period defined in the setup (30 days by default)
import UIKit
import Tracker
class ViewController: UIViewController {
let tracker: Tracker = ATInternet.sharedInstance.defaultTracker
override func viewDidLoad() {
super.viewDidLoad()
tracker.setConfig(["campaignLastPersistence": "true", "campaignLifetime" : "15"], override: false) { (isSet) -> Void in
print("Campaign configuration is now set")
}
}
}#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;
[self.tracker setConfig:@{@"campaignLastPersistence": @"true", @"campaignLifetime": @"15"} override:NO completionHandler:^(BOOL isSet) {
NSLog(@"%@", @"Campaign configuration is now set");
}];
}
@endIf you wish to simplify the tagging of your links without having to know the significance of each field, try the interface available in our marketplace. Please note that this interface has been created by our community and can be improved, so feel free to send us your feedback!
-
Tagging an ad campaign
In the case of an ad, the campaign ID format must respect the following rules:
Mandatory:
� A (source): prefix AD
� B: campaign ID value (given by AT Internet)Optional:
� C: creative (in the format [label] or id[label]).
� D: variant (in the format [label] or id[label]).
� E: format (according to IDs given by AT Internet and placed between []. You may also specify any other format of your choice by using the following nomenclature: �[name]�. Example: You can either give a label: [button], or a size: [120×40]).
� F: site (specifying the URL in the format [url]).
� G: general placement within the entire site (according to IDs given by AT Internet and placed between []).
� H: details on the placement within the web page.
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("Ad")
screen.campaign = Campaign(campaignId: "AD-3030-[ad_Version_7]-[without_text]-[468]-[www.site.com]-[GT]-[top_page]")
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:@"Ad"];
// Enable cart and set an identifier
screen.campaign = [[Campaign alloc] initWithCampaignId:@"AD-3030-[ad_Version_7]-[without_text]-[468]-[www.site.com]-[GT]-[top_page]"];
[screen sendView];
}
@end-
Tagging an affiliation campaign
In the case of affiliation, the campaign ID format must respect the following rules:
Mandatory:
� A (source): prefix AL
� B: campaign ID value (in the format [label] or id[label])Optional:
� C: affiliate type (in the format [label] or id[label])
� D: affiliate ID (in the format [label] or id[label])
� E: affiliate ad format (based on predefined IDs. You may also specify any other format of your choice by using the following nomenclature: �[name]�. Example: You can either give a label: [button], or a size: [120×40]).
� F: creative ID (in the format [label] or id[label])
� G: variant (in the format [label] or id[label])
� C1*: custom variable to be declared in the interface (in the id[label])
� C2*: custom variable to be declared in the interface (in the id[label])
� C3*: custom variable to be declared in the interface (in the id[label])*not available in the Analytics Suite, should you need to study these please get back to the support
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("Affiliation")
screen.campaign = Campaign(campaignId: "AL-3030-1[comparison_shopper]-34253-[468]-4[cars_advertisement]-6[blue_version]|233[customer_name]-3425[id_contract]")
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];
// Enable cart and set an identifier
Screen *screen = [self.tracker.screens add:@"Affiliation"]
screen.campaign = [[Campaign alloc] initWithCampaignId:@"AL-3030-1[comparison_shopper]-34253-[468]-4[cars_advertisement]-6[blue_version]|233[customer_name]-3425[id_contract]"];
[screen sendView];
}
@end-
Tagging a sponsored links campaign
In the case of sponsored links, the campaign ID format must respect the following rules:
Mandatory:
� A (source): prefix SEC
� B: campaign ID value (given by AT Internet)Optional:
� C: platform ID (only if your campaign is distinct on each platform)
� D: ad group (in the format [label] or id[label]). This variable is mandatory if importing Google AdWords data.
� E: ad variation (in the format [label] or id[label]). By entering exactly [{creative}] in Google, Google will place a unique variation ID enabling linking to results during data imports from Google.
� F: �S� or �C� according to whether it comes from search results (�S� for Search) or ads on content/display networks (�C� for Content).
� G: the exact keyword bought. By entering exactly [{keyword}] for a campaign in Google, Google will automatically place the exact keyword bought (which may slightly differ from the keyword entered). The principle is similar for Yahoo ([{YSMKEY}]).
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("Sponsored Link")
screen.campaign = Campaign(campaignId: "SEC-300-GOO-[group_1]-[Var_1]-{ifContent:C}{ifSearch:S}-[{keyword}]&xts=1111111")
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];
// Enable cart and set an identifier
Screen *screen = [self.tracker.screens add:@"Sponsored Link"];
[self.tracker.campaigns addWithCampaignId:@"SEC-300-GOO-[group_1]-[Var_1]-{ifContent:C}{ifSearch:S}-[{keyword}]&xts=1111111"];
[screen sendView];
}
@end-
Tagging an email marketing campaign
In the case of email marketing, the campaign ID format must respect the following rules:
Mandatory:
� A (source): prefix EREC, EPR or ES
� B: campaign ID value
� C: email blast ID in the format [label] or id[label] (without this label, it will be impossible to get the email overlay analysis).Optional:
� D: Email date in short format: YYYYMMDD
� E: link ID in the format �[label]� (added by you, based on the link). Please only add if you would like the precise detail of user clicks (and notably email overlay analyses).
Click specification depends on the customer�s preference: each link, or only the main areas.
� F: List of contacts with contact ID in the format id@list (for example, 1435@1 for contact 1435 on list 1).
� G: Precise date and time in long format: YYYYMMDDHHMMSS
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("eMailing")
screen.campaign = Campaign(campaignId: "EPR-300-[Presentation_service]-20070304-[link2]-1435@1-20070304130405")
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:@"eMailing"]
// Enable cart and set an identifier
screen.campaign = [[Campaign alloc] initWithCampaignId:@"EPR-300-[Presentation_service]-20070304-[link2]-1435@1-20070304130405"];
[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