Data Query Task

🔒

Requires data access scope.

Overview

Main Application Scenarios

Due to the large volume of trajectory and behavioral data related to C-end users, providing this data through simple RESTful APIs may cause interface call timeouts. Therefore, Shoplazza provides a feature for developers to "create an asynchronous query task" to retrieve this data. The data is then generated into a CSV file, placed on a file service, and developers are informed of the URL to access these data files, allowing them to download the data when needed.

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 related to the events is consolidated into a single wide table named realtime_events. The data query task created involves searching this table using certain filtering conditions and storing the following fields in a file for easy access, allowing developers to download the records at any time.

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