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

WeChat small program API data analysis


May 19, 2021 WeChat Mini Program Development Document


Table of contents


wx.reportAnalytics(string eventName, Object 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.

Parameters

string eventName

The name of the event

Object data

The custom data that is escalated, key is the field name in the configuration, and value is the reported data.

The sample code

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