This repository was archived by the owner on May 5, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Products f99d37
Benjamin Diolez edited this page May 5, 2026
·
1 revision
AT Internet’s SDK enables you to tag products for sale that are viewed by your users during usage of your application.
The measurement of viewed products needs an option to be activated. Please contact the support centre for more information.
Once your tag has been initialised, you can send information of viewed products.
If you want to use variables, be sure to import ATInternet, Tracker and Product classes in your Activity.
The tracker makes a Products object available. This object exposes the following methods:
- add: Add a viewed product to the list and returns a Product object.
- remove: Removes a viewed product in the list.
- removeAll:Removes all viewed products.
- sendViews : Send all viewed products.
- Tagging a viewed product
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.Products().add("ID[p1]", "ID[category1]", "ID[category2]").sendView();
}
}- Tagging several viewed products
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.Products().add("ID[p1]");
tracker.Products().add("ID[p2]");
tracker.Products().add("ID[p3]");
tracker.Products().add("ID[p4]");
tracker.Products().add("ID[p5]");
tracker.Products().add("ID[p6]");
tracker.Products().sendViews();
}
}- Tagging viewed products with an �add to cart�
package com.atinternet.atinternetdemo;
import android.app.Activity;
import android.os.Bundle;
import com.atinternet.tracker.ATInternet;
import com.atinternet.tracker.Product;
import com.atinternet.tracker.Tracker;
import java.util.ArrayList;
public class MainActivity extends Activity {
private Tracker tracker;
private ArrayList<Product> products = new ArrayList<>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
tracker = ATInternet.getInstance().getDefaultTracker();
}
@Override
protected void onResume() {
super.onResume();
// Enable cart and set an ID
tracker.Cart().set("1");
// Declare first product
Product p1 = tracker.Products().add("1254[MF839FA]", "2[Laptop]", "20[Macbook Pro]");
p1.setQuantity(1)
.setUnitPriceTaxFree(1839)
.setUnitPriceTaxIncluded(2299);
products.add(p1);
// Declare second product
Product p2 = tracker.Products().add("1253[MF885FA]", "1[Desktop]", "10[iMac]");
p2.setQuantity(1)
.setUnitPriceTaxFree(1199)
.setUnitPriceTaxIncluded(1499);
products.add(p2);
tracker.Cart().Products().add(p1);
}
}- Removal of a product
@Override
protected void onResume() {
super.onResume();
tracker.Products().remove("1254[MF839FA]");
}- Removal of all products
@Override
protected void onResume() {
super.onResume();
tracker.Products().removeAll();
}| Name | Type | Default value | Description |
|---|---|---|---|
| productId | String | Empty string | Gets or sets the product ID |
| category1 | String | null | Gets or sets the first product category |
| category2 | String | null | Gets or sets the second product category |
| category3 | String | null | Gets or sets the third product category |
| category4 | String | null | Gets or sets the fourth product category |
| category5 | String | null | Gets or sets the fifth product category |
| category6 | String | null | Gets or sets the sixth product category |
| quantity | Int | -1 | Gets or sets the product quantity |
| unitPriceTaxIncluded | Double | -1 | Gets or sets the price per unit (including tax) |
| unitPriceTaxFree | Double | -1 | Gets or sets the price per unit (without tax) |
| discountTaxIncluded | Double | -1 | Gets or sets the discount amount (including tax) |
| discountTaxFree | Double | -1 | Gets or sets the discount amount (without tax) |
| promotionalCode | String | null | Gets or sets the product’s promotional code |
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