Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

WeChat small program API data and custom data escalation


May 19, 2021 WeChat Mini Program Development Document


Table of contents


wx.reportAnalytics(eventName, data)

Custom analysis data escalation interface. Before you can use it, you need to create a new event in the background custom analysis of the small program management and configure the event name and field.

Description of the parameters:

Parameters Type Required Description
eventName String Is The name of the event.
data Object Is Reported custom data. Key is the field name in the configuration and value is the reported data

Example code:

wx.reportAnalytics('purchase', {
  price: 120,
  color: 'red'
})