UStat provides flexible, high-performance event tracking to record user interactions (button clicks, form submissions, link navigation, etc.), enabling deep behavior analysis and conversion optimization.
Event tracking captures user actions by adding
data-ustat="event_name"
attributes to HTML elements. UStat automatically logs these interactions as analyzable events.
Add the following attribute to target elements (or their parent nodes within 3 DOM levels):
Example:
![]()

Clicking this link records a "BannerClick" event
When an element is clicked, UStat scans up to 3 parent nodes:
| Rule | Outcome |
|---|---|
| 3-Level Max Search | Checks current element → Parent → Grandparent → Great-grandparent |
| First Match Triggers | Stops at first data-ustat="xxx" found |
| No Match = No Record | If no attribute in 3 levels, click is ignored |
✅ Correct Implementations
Case 1: Direct Element Tagging

![]()
Click records button "SubmitForm"
immediately
。
Case 2: Second-Level Parent Tagging
![]()

Click records "CardClick" (found within 3 levels)
❌ Common Errors
Error 1: Exceeding 3-Level Limit
![]()

👉 Event NOT recorded (attribute at 4th level)
Error 2: Missing data-ustat Attribute
![]()

No tracking occurs without the attribute.
Log in to UStat → Event Analytics module
View event trends and totals (default: last 24 hours)
Click Details for granular analysis:
Device/OS breakdown; Geographic distribution; Behavioral metrics
✅ Standardized Naming:
BtnSubmit
、
NavLoginClick
✅ Direct HTML Implementation: Ensure final rendered HTML contains attributes
✅ Cache/CDN Validation: Verify post-deployment
⚠️ Don't tag unrendered frameworks (Vue/React without SSR)
⚠️ Don't apply to display:none elements
⚠️ Avoid duplicate names on same page
| Issue | Solution |
|---|---|
| Events not appearing? | 1. Confirm attribute exists within 3 DOM levels 2. Check event name consistency 3. Verify UStat script loads |
| Supported elements? | All clickable HTML tags: button, a, div, span, etc. |
| Duplicate event names? | Technically allowed, but unique names recommended for accurate attribution |
Website:https://www.ustat.com
Email: service@ustat.com
QQ :3004364115
Telegram:@ustat_com