User analysis data interface


User analysis data interface

1474943031540343.jpg

##WeChat The public platform launched an invitation-only internal test of the data interface on January 6, 2015. Through the data interface, developers can obtain similar but more flexible data to the statistics module of the official website of the public platform, and can also perform advanced processing as needed.

In the permission set division of the official account login authorization mechanism, the user analysis data interface belongs to user management permissions.

The time to open the data interface to all public account developers will be notified separately.

Please note:


The user analysis data interface refers to the interface used to obtain user analysis data in the official website data statistics module of the public platform. The specific interface list is as follows (there is currently no user attribute data interface):

#1. The public account data database on the interface side only stores data after December 1, 2014. , the date before this will not be queried, and even if it is found, it is untrustworthy dirty data;

2. Developers are asked to save the data in their own database after calling the interface to obtain the data, that is, Speeding up the next user's access speed and reducing unnecessary losses in WeChat side interface calls.

Interface nameMaximum time spanInterface calling address (must use https)
Get user increase and decrease data (getusersummary)7https://api.weixin.qq.com/datacube/getusersummary?access_token=ACCESS_TOKEN
Get cumulative user data (getusercumulate)7https://api.weixin.qq.com/datacube/getusercumulate?access_token=ACCESS_TOKEN

The maximum time span refers to the maximum time range that can obtain data when an interface is called. For example, the maximum time span is 7, which means that up to 7 days of data can be obtained at one time. Please obtain the actual value of access_token through "Get access_token".


Interface call request description

The user analysis data interface (including all interfaces in the interface list) needs to POST the following sample data packet to the corresponding interface call address:

{ 
    "begin_date": "2014-12-02", 
    "end_date": "2014-12-07"
}

Call parameter description

ParameterIs it requiredDescription
access_tokenYesCall interface credentials
begin_date is the starting date for to obtain data. The difference between begin_date and end_date must be less than "maximum "Time span" (for example, when the maximum time span is 1, the difference between begin_date and end_date can only be 0 to be less than 1), otherwise an error will be reported
end_date It is the end date of to obtain data. The maximum value allowed for end_date is yesterday

Return instructions

Under normal circumstances, the returned JSON data packet of the interface for obtaining user increase and decrease data is as follows:

{ 
    "list": [ 
        { 
            "ref_date": "2014-12-07", 
            "user_source": 0, 
            "new_user": 0, 
            "cancel_user": 0
        }
	//后续还有ref_date在begin_date和end_date之间的数据
    ]
}

Under normal circumstances, the interface for obtaining cumulative user data The returned JSON data packet is as follows:

{ 
    "list": [ 
        { 
            "ref_date": "2014-12-07", 
            "cumulate_user": 1217056
        }, 
	//后续还有ref_date在begin_date和end_date之间的数据
    ]
}

Return parameter description

ParameterDescription
ref_dateThe date of the data
user_sourceThe user’s channel, the meaning of the numerical value is as follows:

0 represents other totals 1 represents public account search 17 represents business card sharing 30 represents scanning QR code 43 represents the menu in the upper right corner of the image and text page 51 represents follow after payment (on the payment completion page) 57 represents the name of the public account in the image and text page 75 represents the public No. article advertisement 78 represents circle of friends advertisement

new_userThe number of new users
cancel_userThe number of unfollowed users, new_user Subtract cancel_user to get the net number of new users
cumulate_userTotal number of users

WeChat will return error codes and other information when an error occurs. For specific error code inquiries, please see: Global Return Code Description

WeChat background data analysis




What data indicators are there in the WeChat data background?
WeChat backend data makes a simple summary and display of data from the aspects of people, pictures, texts, messages and interfaces. Each indicator can choose different time nodes to view the change trend. The system default setting is 7 days , 14 days and 30 days 3 nodes. See the figure below for specific indicators:

201609270956141036.png


##