Start from a common question: what to track, how to configure it, which report to open and how to read the numbers. Copy the code and swap in your own event and property names.
Sign-up / order funnel
Scenario
An online shop (website or mini program) wants to know how many visits complete sign-up, checkout and payment, and where people get stuck.
Track events where sign-up succeeds, an order is placed and payment completes; "visited a page" steps need no code — just use the page path:
Add goals under "Site settings → Goals" (mini programs: "Settings → Goals"), up to 20. A goal is either a page visit (path with * wildcards such as /order/*/done; page route for mini programs) or an event (optionally restricted to one property value, e.g. purchase where plan = pro). Then in "Funnels" click "New funnel" and add 2–8 steps in order, e.g. visit /product/* → event checkout → event purchase.
Where to look
"Goals" shows conversions, conversion rate and conversions by channel for each goal; "Funnels" shows visits and drop-off per step and can be split by a dimension (source, device, location…).
How to read itConversion rate = visits that reached the goal ÷ visits. Funnels are counted per visit (session): a visit reaches step i only if it completed steps 1…i in order within that visit, so flows spread across days or devices are not joined. Apps have no goals or funnels yet; compare step events in event analysis instead.
Channels and UTM campaigns
Scenario
The same landing page is promoted in a newsletter, search ads and a social post, and you want to compare visits and conversions per channel.
No code changes: add UTM parameters to each campaign link; the gateway reads utm_source, utm_medium and utm_campaign from the page URL.
When the campaign starts, click "Notes" on the trend chart to mark the launch; comparing before and after becomes easy.
Where to look
"Sources → UTM campaigns" shows visits and quality by source, medium and campaign; traffic without UTM appears under "All sources" (direct, search engines, social, referring sites), and search traffic further under "Search engines" and "Search keywords". Click any row to filter the whole dashboard by it — "Goals" then shows that channel's conversions.
How to read itSources are attributed by the first page of a visit: if a visit starts from a link with utm_source=wechat, every view, event and conversion in that visit counts for wechat. Mini programs have no URL source — use scene values under "Sources" (QR scan, share card, search…); apps use FMENG_CHANNEL for install channels, shown under "Versions".
Event properties and value ranges
Scenario
A video player wants to know which ranges the first-frame time (from tapping play to the first frame) falls into, not just an average; the same goes for load times, order amounts or quantities.
Send the value as an event property and pass a plain number (ms, amount, count) — no units such as "830ms", or it cannot be bucketed:
In "Events", find video_first_play, click "View properties" and pick first_play_ms. When most values are numbers a "By value / By range" switch appears, and with more than 20 distinct values it defaults to ranges: evenly stepped from the minimum to P99, or enter your own boundaries such as 500,1000,2000,3000. Use "By value" for categorical properties like codec.
How to read itRanges are closed on the left and open on the right: "500 – 1000" includes 500 but not 1000. The summary shows the count of numeric values, the average and P50 / P90 / P99 — P90 = 1200 means 90% of plays show the first frame within 1.2 s; non-numeric values are counted separately and left out of the ranges. Available for websites, mini programs and apps; the API endpoint is …/stats/event-property-ranges.
Linking signed-in users
Scenario
People sign in on both phone and laptop and you want to join their visits, or attach your business user ID to the data.
Set the user ID after sign-in and clear it on sign-out. Use an internal user ID (or its hash), never a phone number or email address:
How to read itWebsites: data sent after identify counts visitors by user ID, so one user on several devices or after clearing storage is one visitor; data sent before stays as it was, so the anonymous visit before sign-in and the visit after count as two visitors. Mini programs and apps: the user ID is stored with events, but user counts in reports are still de-duplicated by device.
Single-page app routing
Scenario
In a Vue or React single-page app, route changes do not reload the page, and you want each route to count as a page view.
With history-mode routing no code is needed: fmeng.js listens to pushState, replaceState and popstate and records a view on every URL change. Hash mode (/#/user/42) still records views, but pages are counted by the path before #, so every page collapses into one path — switch to history mode:
JavaScript
// Vue Router: history mode is recommended, each route has its own path (/user/42)
To decide yourself when a view counts (e.g. after data has loaded), add data-auto="false" to the script tag and call fmeng.pageview() when the route is ready; repeated calls for the same URL count once:
JavaScript
// <script ... data-auto="false">
router.afterEach(() => {
window.fmeng && window.fmeng.pageview()
})
Where to look
"Pages" shows views and time per route, "Page flow" shows where a route is reached from and where people go next, and "Paths" shows the page sequence of whole visits.
How to read itTime on page is split at each route change; returning to an already open tab is not a new view, it only keeps adding time. For Taro, uni-app and other mini program frameworks see "Frameworks" in the mini program docs.
App crash and ANR triage
Scenario
After a release you want to know whether it is stable: are crashes up, which issue dominates, which devices and versions are affected.
Crash and ANR / hang capture are on by default — just initialize as early as possible at app start (crashes during startup are caught too). To set them explicitly:
.debug(BuildConfig.DEBUG) // upload logs in logcat
.build());
Configure
To test: on Android install the demo app from the downloads page, tap "Java crash" or "Native crash" and reopen it; on iOS do not keep the Xcode debugger attached (it intercepts the crash) — stop the run, open the app from the home screen and trigger it there. Crashes are uploaded on the next launch.
Where to look
"Crashes" lists issues with crash count, affected users and latest version; click a row for the latest stack and the distribution by app version, model, OS version, manufacturer, screen and channel. "ANRs" has the same layout (iOS main-thread hangs appear there too). The header shows crash-free users and crash-free sessions.
How to read itOne issue = same type + exception class + top 5 stack frames (without line numbers), so crashes in the same code on different lines are merged. Crash rate = sessions with a crash ÷ sessions; ANRs are counted separately and not included. In iOS release builds your own frames show as "image + offset" and need the dSYM to symbolicate.
Open API and MCP
Scenario
You want statistics in your weekly report or BI dashboard, or an AI assistant that can answer "which channel brought the most visits last week".
Create a token on the console's "API tokens & MCP" page (shown only once — save it right away), then read reports through the REST API. Dates are calendar days in the site's time zone, both ends inclusive:
Connect an AI assistant — for Claude Code run the command below (configs for Codex and other clients are shown after you create a token):
Shell
claude mcp add --transport http fmeng https://t.t3j.com/api/mcp \
--header "Authorization: Bearer fm_xxx"
Where to look
Then just ask in plain language, e.g. "List my sites and tell me which UTM source brought the most visits last week", "Create a site for example.com and give me the install code", "What was the top crash in this app over the last 7 days?".
How to read itA token acts as your account but cannot call account, token or admin endpoints; each token is limited to 600 requests per minute. MCP covers website management and reports and app management and reports; mini programs can only be listed, created and deleted — use the REST API for their reports.
Mini program pages and sharing
Scenario
A mini program wants to know which pages hold attention, where users come in, and how many opens shared cards bring back.
Page views are collected automatically (Page.onShow). Sharing is automatic too: as long as a page defines a share handler, the SDK records a share and its method:
JavaScript
// pages/goods/detail.js
Page({
// Required for sharing; the method is recorded as button (in-page button) or menu (top-right menu)
// Share to Moments; the method is recorded as timeline
onShareTimeline() {
return { title: 'Recommended', query: 'id=100' }
},
})
Where to look
"Pages" shows views, users, time, entries, bounces and exits per page; "Sources" counts opens by scene value, groups WeChat scene values into channels such as share, search and QR scan, and shows shares, share-card opens and share-backs; "Paths" shows the page sequence after entry.
How to read itShare-back = opens from share cards ÷ shares; 0.8 means each share brings back 0.8 opens on average. Scene categories currently cover WeChat only. Pages are counted by route without parameters, so one detail page covers all products; to see individual products, track a custom event with the product id on the detail page and look at it with "View properties".