Data Query Task

🔒

Requires data access scope.For more info, refer to:access scope

Overview

Main Application Scenarios

Given the large volume of trajectory and behavioral data generated by customer end users, relying solely on traditional RESTful APIs to retrieve this information can lead to performance issues, such as interface call timeouts.

To address this, Shoplazza offers a robust solution: asynchronous query tasks. Developers can create tasks to fetch data without waiting for immediate responses. Once the task is processed, the data is exported into a CSV file and hosted on a secure file service. Developers are then notified with a URL to access and download the data at their convenience.

What data can be queried?

Data Type (User Event)Explanation
impressionsProduct Exposure - Tracks when a product is displayed to a user.
add_payment_infoCheckout Add Payment Info - Refers to when payment information is added during the checkout process.
add_to_cartAdd to Cart - Records when a product is added to the shopping cart.
begin_checkoutBegin Checkout - Indicates when a user initiates the checkout process.
pageviewPage View - Captures records of page visits by users.
place_orderPlace Order - Represents when an order is placed by a user.
product_searchProduct Search - Tracks instances where users search for products.
product_viewProduct View - Monitors views of product detail pages.
purchase_productPurchase Product - Records when a product is purchased.
refund_orderRefund Order - Accounts for when an order is refunded.

Data Model

Data Structure for Analytical Data

Event tracking data is consolidated into a single comprehensive table named realtime_events. To streamline access, a data query task is created to search this table based on specific filtering conditions. The results are then exported into a file containing the relevant fields, enabling developers to conveniently download and access the records whenever needed.

FieldDescription
eventEvent type ,such as :add_payment_info, add_to_cart, etc
session_idSession ID (valid for 30 minutes)
store_idStore ID
_osCustomer's operating system
_ipCustomer's IP address
cityCity, derived from IP address
provinceProvince, derived from IP address
countryCountry, derived from IP address
timeTime the event occurred
_referrerReferring page
_referrer_hostHost of the referring page
_urlURL of the visited page
_url_pathPath of the visited page URL
client_idCustomer identifier with a one-year validity period
_latest_referrer_hostThe last external source host
product_titleProduct title
product_handleProduct handle
product_idProduct ID
variant_idVariant (SKU) ID
priceProduct price
quantityQuantity of items
totalTotal amount
discount_totalDiscount amount (order level)
discountDiscount amount (per item)
payment_methodPayment method
order_idOrder ID
numberOrder number
key_wordSearch keyword
impressionsImpressions
platformPlatform, distinguishes between C-end and B-end
user_agentUser's browser user agent
_screen_heightBrowser height
_screen_widthBrowser width
theme_nameName of the theme used in the store
theme_versionVersion of the theme used in the store
country_abbrCountry abbreviation (two-letter code), derived from IP address
currency_codeCurrency code