-
Notifications
You must be signed in to change notification settings - Fork 0
Orders 2fb863
AT Internet’s SDK allows you to tag orders placed by your users while using your application.
Once your tag is initialised, you can add order information to your screen hit.
If you want to use variables, be sure to import ATInternet, Tracker, Screen and Order classes in your Activity (If you wish to send cart information, please also remember to import Cart).
The Screen object makes an Order method available. This method takes two parameters :
- orderId of type String indicates order identifier
- turnover of type double indicates order turnover
This method sends back an Order-type object.
-
Tagging an order and a main goal screen
Without the SalesTracker option
Even without the SalesTracker option enabled, you can measure the order confirmation screen (main goal) and insert the order total (turnover) as well as the order number (orderId).
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();
Screen s = tracker.Screens().add("Main goal screen");
s.Order("4655", 3876.10);
s.sendView();
}
}With SalesTracker option
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();
Screen s = tracker.Screens().add("Order confirmation");
s.Order("cmd1", 94.30)
//Order status
.setStatus(1)
//First order from that customer
.setNewCustomer(true)
//Payment Method
.setPaymentMethod(1)
//Order Amount
.Amount().set(80, 94.30, 14)
//Order Delivery Info
.Delivery().set(5, 7.5, "1[TNT]")
// Discount info
.Discount().set(5, 7.5, "PROMOTION");
s.sendView();
}
}-
Tagging an order with cart information
For more information on tagging your cart, please visit this page: Cart (SalesTracker)
-
Tagging an order confirmation screen on an app or external site
The goal here is to be able to measure completed orders and reservations, despite the fact that the confirmation screen is hosted by an app or on an external site (like banking platforms, PayPal…).
The tag must be placed on the screen preceding the user’s detour toward the banking or payment platform (the screen containing all information about the order/reservation and its content).
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();
Screen s = tracker.Screens().add("Order info before payment");
s.Order("cmd1", 94.30)
//Order status
.setStatus(1)
//First order from that customer
.setNewCustomer(true)
//Payment Method
.setPaymentMethod(1)
//Order Amount
.Amount().set(80, 94.30, 14)
//Order Delivery Info
.Delivery().set(5, 7.5, "1[TNT]")
//Discount info
.Discount().set(5, 7.5, "PROMOTION");
s.sendView();
}
}- Tagging an order with the addition of custom variables
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();
Screen s = tracker.Screens().add("Order info before payment");
s.Order("cmd1", 94.30)
.setNewCustomer(true)
.setPaymentMethod(1)
.setStatus(1)
//Order needs confirmation (bank validation)
.setConfirmationRequired(true)
.Amount().set(80, 94.30, 14)
.Delivery().set(4, 7.5, "4")
.Discount().set(5, 7.5, "SUMMER")
//Custom Variables
.CustomVars().add(1, "fr").add(2, "fr_FR");
s.sendView();
}
}| Name | Type | Default value | Description |
|---|---|---|---|
| orderId | String | Empty string | Gets or sets the order ID |
| turnover | Double | -1.0 | Gets or sets the order revenue/turnover |
| status | Int | -1 | Gets or sets the order status |
| discount | OrderDiscount | null | Gets or sets discount information |
| amount | OrderAmount | null | Gets or sets total amount information |
| delivery | OrderDelivery | null | Gets or sets delivery information |
| customVariables | OrderCustomVars | null | Gets or sets custom variables |
| isNewCustomer | Boolean | false | Gets or sets if the user is a new customer or not |
| paymentMethod | Int | -1 | Gets or sets the payment method |
| isConfirmationRequired | Boolean | false | Gets or sets whether the order is awaiting confirmation from an external site (bank, PayPal |
| ) |
| Name | Type | Default value | Description |
|---|---|---|---|
| amountTaxFree | Double | -1.0 | Gets or sets the order total (without tax) |
| amountTaxIncluded | Double | -1.0 | Gets or sets the order total (with tax) |
| taxAmount | Double | -1.0 | Gets or sets the tax amount |
| Name | Return type | Description |
|---|---|---|
| set | Order | Includes information about the order total |
| Name | Type | Default value | Description |
|---|---|---|---|
| discountTaxFree | Double | -1.0 | Gets or sets the discount total (without tax) |
| discountTaxIncluded | Double | -1.0 | Gets or sets the discount total (with tax) |
| promotionalCode | String | null | Gets or sets the promotional code used by the user |
| Name | Default value | Description |
|---|---|---|
| set | Order | Includes information about the discount total |
| Name | Type | Default value | Description |
|---|---|---|---|
| shippingFeesTaxFree | Double | -1.0 | Gets or sets the shipping total (without tax) |
| shippingFeesTaxIncluded | Double | -1.0 | Gets or sets the shipping total (with tax) |
| deliveryMethod | String | null | Gets or sets the shipping mode |
| Name | Return type | Description |
|---|---|---|
| set | Order | Includes shipping information |
| Name | Type | Default value | Description |
|---|---|---|---|
| varId | Int | 0 | Gets or sets the variable ID |
| value | String | null | Gets or sets the variable value |
Below label/identifier correspondences for payment methods.
It is possible to enrich this list with your own payment methods in configuration part of your interface.
| Identifier | Label | Category |
|---|---|---|
| 1 | Credit card | Bank cards |
| 2 | Visa | Bank cards |
| 3 | MasterCard | Bank cards |
| 4 | Cheque | Cheque |
| 5 | Store credit cards | Credit cards |
| 6 | Financing | Credit cards |
| 7 | Wire transfer | Bank transfer |
| 8 | Direct debit | Direct debit |
| 9 | PayPal | Electronic money |
Below label/identifier correspondences for order statuses.
| Identifier | Label |
|---|---|
| 0 | No information |
| 1 | Pending |
| 2 | Cancelled |
| 3 | Approved |
| 4 | Returned |
Last update: 04/03/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