-
Notifications
You must be signed in to change notification settings - Fork 0
Product events 8bc6ee
This tagging documentation only applies to Tracker from version 2.16.0.
If you can 't see the “Sales Insights” menu entry in Explorer, please get in touch with us so we can activate this for you.
With the tracker, an ECommerce object is available, exposing different objects and methods useful for measuring:
- Product displays
- Product page displays
- Add-to-cart or remove-from-cart actions
Measuring product display is done by creating a DisplayProduct object, to which the following is associated:
- A list of products, Products, which can contain one or several ECommerceProduct-type products.
A product 's properties should be declared as a HashMap-type collection, with different keys:
- “id” – String: Product ID (mandatory).
- “variant” – String: Product variant (size, colour, etc.).
- “article” – String: Additional level of detail for product variant.
- “placement” – String: Product placement.
- “promocode” – Array: Promotional code table including one or several codes. A promotional code is declared as a label.
- “$” – String: Product name.
- “brand” – String: Product brand.
- “discount” – Boolean: Discounted product.
- “pricetaxincluded” – Float: Price, including tax.
- “pricetaxfree” – Float: Price, excluding tax.
- “stock” – Boolean: Product in stock.
- “category1” – String: The product 's level 1 category (up to 6 tree structure levels are possible; from “category1” to “category6”).
Example
Tracker tracker = ATInternet.getInstance().getDefaultTracker();
DisplayProduct dp = tracker.ECommerce().DisplayProducts().add();
dp.Products().add(new ECommerceProduct(new HashMap<String, Object>() {{
put("id", "7");
put("variant", "1");
put("article", "21");
put("placement", "homepage");
put("promocode", new ArrayList() {{
add("AQQYRTGJ");
}});
put("$", "laptop_A56");
put("brand", "ACER");
put("discount", true);
put("pricetaxincluded", 549);
put("pricetaxfree", 456.2);
put("stock", true);
put("category1", "Computers_and_Networking");
put("category2", "Computers");
put("category3", "Laptops");
}}));
tracker.dispatch();You may use the independent method “tracker.Events.send()” in order to send only your Ecommerce data.
Measuring the display of a product page is done by creating a DisplayPageProduct object, to which the following is associated:
- an ECommerceProduct-type product.
A product 's properties should be declared as a HashMap-type collection, with different keys:
- “id” – String: Product ID (mandatory).
- “variant” – String: Product variant (size, colour, etc.).
- “article” – String: Additional level of detail for product variant.
- “placement” – String: Product placement.
- “promocode” – Array: Promotional code table including one or several codes. A promotional code is declared as a label.
- “$” – String: Product name.
- “brand” – String: Product brand.
- “discount” – Boolean: Discounted product.
- “pricetaxincluded” – Float: Price, including tax.
- “pricetaxfree” – Float: Price, excluding tax.
- “stock” – Boolean: Product in stock.
- “category1” – String: The product 's level 1 category (up to 6 tree structure levels are possible; from “category1” to “category6”).
Example
Tracker tracker = ATInternet.getInstance().getDefaultTracker();
tracker.ECommerce().DisplayPageProducts().add();
dpp.Product().setAll(new HashMap<String, Object>() {{
put("id", "7");
put("variant", "1");
put("article", "21");
put("placement", "homepage");
put("promocode", new ArrayList() {{
add("AQQYRTGJ");
}});
put("$", "laptop_A56");
put("brand", "ACER");
put("discount", true);
put("pricetaxincluded", 549);
put("pricetaxfree", 456.2);
put("stock", true);
put("category1", "Computers_and_Networking");
put("category2", "Computers");
put("category3", "Laptops");
}});
tracker.dispatch();You may use the independent method “tracker.Events.send()” in order to send only your Ecommerce data.
Measuring the addition of a product to the cart is done by creating an AddProduct object, to which the following are associated:
- an ECommerceCart-type cart
- an ECommerceProduct-type product
A cart must contain a property:
- “id” – String: Cart ID (mandatory).
A product 's properties should be declared as a HashMap-type collection, with different keys:
- “id” – String: Product ID (mandatory).
- “variant” – String: Product variant (size, colour, etc.).
- “article” – String: Additional level of detail for product variant.
- “placement” – String: Product placement.
- “promocode” – Array: Promotional code table including one or several codes. A promotional code is declared as a label.
- “$” – String: Product name.
- “brand” – String: Product brand.
- “discount” – Boolean: Discounted product.
- “pricetaxincluded” – Float: Price, including tax.
- “pricetaxfree” – Float: Price, excluding tax.
- “stock” – Boolean: Product in stock.
- “quantity” – Number: Number of products to add.
- “category1” – String: The product 's level 1 category (up to 6 tree structure levels are possible; from “category1” to “category6”).
- “cartcreation” – Boolean: Cart creation (true if the action of adding a product has resulted in cart creation, false otherwise).
Example
Tracker tracker = ATInternet.getInstance().getDefaultTracker();
AddProduct ap = tracker.ECommerce().AddProducts().add();
ap.Cart().set("id", "34");
ap.Product().setAll(new HashMap<String, Object>() {{
put("id", "3");
put("variant", "1");
put("article", "21");
put("placement", "homepage");
put("promocode", new ArrayList() {{
add("AQQYRTGJ");
}});
put("$", "laptop_A56");
put("brand", "ACER");
put("discount", true);
put("pricetaxincluded", 549);
put("pricetaxfree", 456.2);
put("stock", true);
put("quantity", 1);
put("cartcreation", true);
put("category1", "Computers_and_Networking");
put("category2", "Computers");
put("category3", "Laptops");
}});
tracker.dispatch();You may use the independent method “tracker.Events.send()” in order to send only your Ecommerce data.
Measuring the deletion of a product from the cart is done by creating a RemoveProduct object, to which the following are associated:
- an ECommerceCart-type cart
- an ECommerceProduct-type product
A cart must contain a property:
- “id” – String: Cart ID (mandatory).
A product 's properties should be declared as a HashMap-type collection, with different keys:
- “id” – String: Product ID (mandatory).
- “variant” – String: Product variant (size, colour, etc.).
- “article” – String: Additional level of detail for product variant.
- “placement” – String: Product placement.
- “promocode” – Array: Promotional code table including one or several codes. A promotional code is declared as a label.
- “$” – String: Product name.
- “brand” – String: Product brand.
- “discount” – Boolean: Discounted product.
- “pricetaxincluded” – Float: Price, including tax.
- “pricetaxfree” – Float: Price, excluding tax.
- “stock” – Boolean: Product in stock.
- “quantity” – Number: Number of products to add.
- “category1” – String: The product 's level 1 category (up to 6 tree structure levels are possible; from “category1” to “category6”).
Example
Tracker tracker = ATInternet.getInstance().getDefaultTracker();
RemoveProduct rp = tracker.ECommerce().RemoveProducts().add();
rp.Cart().set("id", "34");
rp.Product().setAll(new HashMap<String, Object>() {{
put("id", "3");
put("variant", "1");
put("article", "21");
put("placement", "homepage");
put("promocode", new ArrayList() {{
add("AQQYRTGJ");
}});
put("$", "laptop_A56");
put("brand", "ACER");
put("discount", true);
put("pricetaxincluded", 549);
put("pricetaxfree", 456.2);
put("stock", true);
put("quantity", 1);
put("category1", "Computers_and_Networking");
put("category2", "Computers");
put("category3", "Laptops");
}});
tracker.dispatch();You may use the independent method “tracker.Events.send()” in order to send only your Ecommerce data.
Last update: 12/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