-
Notifications
You must be signed in to change notification settings - Fork 0
On site ads 7f7279
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.
If you want to use variables, be sure to import ATInternet, Tracker, SelfPromotion and Publisher classes in your Activity.
To tag your ads, the tracker exposes two objects, publishers and selfPromotions, according to the type of ad to be measured.
These two objects themselves expose two methods:
- add
- sendImpressions
The add method allows you to add an ad tag and put it in standby for send. This method returns an object with type Publisher or SelfPromotion according to the case in question.
To send the defined information, you must call the sendTouch or sendImpression method of your object, based on the type of action taken by the user, or call the Tracker‘s dispatch method.
Please note, calling the methods sendTouch and sendImpression modifies the object’s action property.
The sendImpressions method is used to send all ad data which action is defined as Impression.
The sendTouch and sendImpression methods are available only through the objects Publisher or SelfPromotion returned by the Add method.
They lead to an instantaneous and independent sending (click or impression) of the newly added ad tag.
Example
@Override
protected void onResume() {
super.onResume();
tracker.SelfPromotions().add(1).sendImpression();
}The sendImpressions method is available through Publishers and SelfPromotions objects.
It allows a global sending of all impression-type ad tags that have been previously added.
Example
@Override
protected void onResume() {
super.onResume();
tracker.SelfPromotions().add(1);
tracker.SelfPromotions().add(2);
tracker.SelfPromotions().sendImpressions();
}- Tagging an ad impression for a third-party
package com.atinternet.atinternetdemo;
import android.app.Activity;
import android.os.Bundle;
import com.atinternet.tracker.ATInternet;
import com.atinternet.tracker.Tracker;
public class MainActivity extends Activity {
private Tracker tracker;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
tracker = ATInternet.getInstance().getDefaultTracker();
}
@Override
protected void onResume() {
super.onResume();
tracker.Publishers().add("[ad1]").sendImpression();
}
}- Tagging an ad “click” for a third-party
@Override
public void onClick(View v) {
ATInternet.getInstance().getDefaultTracker().Publishers().add("[ad1]").sendTouch();
}- Tagging a self-promotion campaign impression
package com.atinternet.atinternetdemo;
import android.app.Activity;
import android.os.Bundle;
import com.atinternet.tracker.ATInternet;
import com.atinternet.tracker.Debugger;
import com.atinternet.tracker.Tracker;
public class MainActivity extends Activity {
private Tracker tracker;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
tracker = ATInternet.getInstance().getDefaultTracker();
}
@Override
protected void onResume() {
super.onResume();
tracker.SelfPromotions().add(1).sendImpression();
}
}- Tagging an self-promotion campaign “click”
@Override
public void onClick(View v) {
ATInternet.getInstance().getDefaultTracker().SelfPromotions().add(3).sendTouch();
}- Tagging several ads and sending impressions
50 impressions per page maximum
package com.atinternet.atinternetdemo;
import android.app.Activity;
import android.os.Bundle;
import com.atinternet.tracker.ATInternet;
import com.atinternet.tracker.Tracker;
public class MainActivity extends Activity {
private Tracker tracker;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
tracker = ATInternet.getInstance().getDefaultTracker();
}
@Override
protected void onResume() {
super.onResume();
tracker.Publishers().add("[ad1]")
.setCreation("[creation]")
.setVariant("[variant]")
.setFormat("[120x40]")
.setGeneralPlacement("[generalPlacement]")
.setDetailedPlacement("[detailedPlacement]")
.setAdvertiserId("1[advertiserId]")
.setUrl("[http://advertiser-url.com]");
tracker.Publishers().add("[ad2]");
tracker.Publishers().add("[ad3]")
.setCreation("[creation]")
.setVariant("[variant]");
tracker.Publishers().sendImpressions();
}
}- Tagging several self-promotion campaigns and sending impressions
package com.atinternet.atinternetdemo;
import android.app.Activity;
import android.os.Bundle;
import com.atinternet.tracker.ATInternet;
import com.atinternet.tracker.Debugger;
import com.atinternet.tracker.Tracker;
public class MainActivity extends Activity {
private Tracker tracker;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
tracker = ATInternet.getInstance().getDefaultTracker();
}
@Override
protected void onResume() {
super.onResume();
tracker.SelfPromotions().add(1)
.setFormat("[120x40]")
.setProductId("p1");
tracker.SelfPromotions().add(2);
tracker.SelfPromotions().add(3)
.setProductId("p3");
tracker.SelfPromotions().sendImpressions();
}
}- Tagging self-promotion ads and campaigns and using dispatcher
package com.atinternet.atinternetdemo;
import android.app.Activity;
import android.os.Bundle;
import com.atinternet.tracker.ATInternet;
import com.atinternet.tracker.Debugger;
import com.atinternet.tracker.Tracker;
public class MainActivity extends Activity {
private Tracker tracker;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
tracker = ATInternet.getInstance().getDefaultTracker();
}
@Override
protected void onResume() {
super.onResume();
tracker.Publishers().add("[ad1]");
tracker.Publishers().add("[ad2]");
tracker.SelfPromotions().add(1);
// This will send one hit with publishers and selfpromotion impressions
tracker.dispatch();
}
}- Tagging self-promotion ads and campaigns and adding screen information
package com.atinternet.atinternetdemo;
import android.app.Activity;
import android.os.Bundle;
import com.atinternet.tracker.ATInternet;
import com.atinternet.tracker.Debugger;
import com.atinternet.tracker.Tracker;
public class MainActivity extends Activity {
private Tracker tracker;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
tracker = ATInternet.getInstance().getDefaultTracker();
}
@Override
protected void onResume() {
super.onResume();
Screen s = tracker.Screens().add(this);
s.Publishers().add("[ad1]");
s.Publishers().add("[ad2]");
s.SelfPromotions().add(1);
s.sendView();
}
}| Name | Type | Default value | Description |
|---|---|---|---|
| campaignId | String | Empty string | Gets or sets the campaign name (ex: [label] or id[label]) |
| creation | String | null | Gets or sets the creative name (ex: [label] or id[label]) |
| variant | String | null | Gets or sets the variant name (ex: [label] or id[label]) |
| format | String | null | Gets or sets the format name (predefined or custom ID. ex: [120×40]) |
| generalPlacement | String | null | Gets or sets the general placement (textual ID predefined by us, to be formatted as [label]) |
| detailedPlacement | String | null | Gets or sets the detailed placement (ex: [label] or id[label]) |
| advertiserId | String | null | Gets or sets the advertiser ID (ex: id[label]) |
| url | String | null | Gets or sets the URL linked (ex: [url] |
| action | Enum | OnAppAd.Action.View | Gets or sets the action type (View or Touch) |
| CustomObjects | CustomObjects | null | Class enabling the addition of custom objects on your hits |
| Name | Return type | Description |
|---|---|---|
| sendTouch | void | Sends a hit indicating that an ad was touched |
| sendImpression | void | Sends a hit indicating that an ad was seen |
| Nom | Type | Default value | Description |
|---|---|---|---|
| adId | Int | -1 | Gets or sets the ad ID |
| format | String | null | Gets or sets the format name (predefined or custom ID. ex: [120×40]) |
| productId | String | null | Gets or sets the self-promoted product in question, that can be found in the order (Subject to the SalesTracker option) |
| action | Enum | OnAppAd.Action.View | Gets or sets the action type (View or Touch) |
| CustomObjects | CustomObjects | null | Class enabling the addition of custom objects on your hits |
| Name | Return type | Description |
|---|---|---|
| sendTouch | void | Sends a hit indicating that a self-promotion campaign was touched |
| sendImpression | void | Sends a hit indicating that a self-promotion campaign was seen |
Last update: 27/08/2020
-
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