Small program zero development buried point, is so simple!

Time:2021-5-1

Author: Tencent tabpan

Taro introduces Tencent’s traceless embedded point capabilities of wechat apps, providing developers with eight traceless embedded point capabilities and custom embedded point capabilities of true zero development, including eight automatic embedded point capabilities such as small program startup, display, hide, page browsing, page leaving, sharing, pull-down refresh, pull-up bottom touch, and customized embedded point capabilities such as search and commodity attribution, As well as business analysis, live analysis, shopping guide analysis and other capabilities, so that your small program can be based on wechat ecology, connect the whole scene with multiple contacts, and realize global business insight.

With the end of demographic dividend, the growth of users is facing a bottleneck period. How to find new growth points has become a problem for the development of enterprises. As a domestic social giant, wechat has huge traffic, and its natural social attributes provide a good ecological environment for commercial cash flow. As the strategic focus of realization in wechat ecology, small programs have great potential. According to the latest data, the daily active users of small programs exceed 400 million, creating a total of 800 billion transactions. More and more enterprises and teams are investing in the development of small programs.

Although there are many teams developing small programs, the actual effects are different. How to make the developed small programs grow rapidly and give play to the social scale effect has become a problem that every developer needs to pay attention to.

As a platform for data analysis and application in wechat ecosystem officially launched by Tencent, Tencent can provide developers with the capabilities of flow data monitoring, channel evaluation, user insight, business diagnosis, precision marketing, etc., and guide operational decision-making.

At present, taro and Tencent have reached an official cooperation. Taro developers can realize global data insight through zero development traceless buried point capability and user-defined buried point capability, connecting the whole scene multi touch in wechat.

One key installation to realize true zero development

In order to make it easier for developers to access and experience traceless buried point capability, Tencent and taro think from multiple perspectives, break the boundary, optimize from taro command line, taro template, several small programs SDK and data flow link, adjust 11 vertical data flow links, open up 4 stages and 13 links of data access, Shorten the data access experience from 3-5 days to 10 minutes. Finally, the zero development and zero configuration data buried point experience from 0 to 1 is presented to developers.

Tencent & Taro’s wechat applet template can be quickly installed through the command line with one click. Without any development, Tencent can have eight automatic buried point capabilities, such as small program startup, display, hide, page browsing, page leaving, sharing, pull-down refresh, pull-up touch and so on. For the existing small programs, Tencent taro also provides plug-ins that can automatically analyze and introduce the SDK, which can realize zero development and introduce the SDK, so that small program developers can get rid of the tedious buried point development and directly introduce the basic buried point function.

图片

Flow chart

Taro * helps global data analysis

After the number of access, developers can view the data dimension of traffic indicators, channel sources, user trends, crowd portrait, official account live, and understand the current operation of small programs, and achieve data driven growth.

图片

At the same time, in addition to the basic business indicators, it also provides high-level capabilities such as commodity analysis and recommendation, precision marketing, and crowd recommendation. If necessary, you can contact us [email protected]tencent.com Apply.

How to use

1. New app quick experience guide

Need to upgrade taro to 2. X or 3. X

  1. taro init myApp
  2. choicedefault-youshuTemplate
  3. npm run dev:weapp
  4. Wechat applet developer tool console can see 8 behavior logs
  5. visit   https://docs.qq.com/form/fill/DUkZHalR0RUJCVkVj#/fill   Apply for data view permission

    Through the above process, your wechat app has the experience ability of eight user behavior buried points. After the experience is completed, you only need to replace several token and wechat app ID to have several official functions. Access to official account:   https://docs.qq.com/form/fill/DUkZHalR0RUJCVkVj#/fill

2. SDK access of existing small programs

1. Installation

  • Install SDK through NPM
    npm i sr-sdk-wxapp
  • Importing SDK into app.jsx through import
    import sr from 'sr-sdk-wxapp'

2. Add trusted domain name

Log in to wechat public platform, enter and  https://zhls.qq.com  Add as legal domain name of request.

There is also SDK version check in the development environment, so you will be prompted  https://sr-home-1257214331.cos.ap-guangzhou.myqcloud.com Not in the list of legitimate domain names in the following request , It can be handled by setting the non checking domain name.

3. Init initialization

init(options: object)

The configuration interface is used to adjust the basic mechanism of SDK. belongApp()Call before calling.

Call the initialization SDK for the first time, and call the configuration passed in before overriding again, which can be called many times.

name type Required describe
appid string Y Wechat applet appid
token string Y After the access application, there are several certificate strings provided
usePlugin bool Whether to use a small program plug-in, the default is: false
debug bool Whether to print the log. The default is false
openSdkShareDepth bool Whether to turn on the shared link recording function, the default value is false. After it is turned on, the user’s shared link a – > b – > C – > D will be recorded
serverUrl string Pass in the user-defined background reporting interface. If it is passed in, the token will be meaningless. The default value is: ‘ https://zhls.qq.com/api/report ’
trackApp bool Whether to enable automatic tracking of APP exposure events (APP related preset events, such as app – onluanch), the default is true
proxyPage bool Whether to turn on the automatic proxy page. The default value is false. The SDK is responsible for reporting events such as browse, leave, and share. You can use sr.page instead of page (sr.page (options))
autoStart bool Whether to enable automatic reporting. The default is: false, open_ The ID cannot be obtained automatically. Generally, the sr.startreport method is called manually after the login service to start the report

4. Examples

import sr from 'sr-sdk-wxapp'
sr.init({
  /**
   *There are several Ka 'access test' allocated apps_ ID, and the corresponding business interface person is responsible for it
   */
  token: 'bi72fccc7184ef4xxx',
  /**
   *Wechat applet appid, starting with wx
   */
  appid: 'wx195745e8e342bxxx',
  /**
   *If the applet plug-in is used, it needs to be set to true
   */
  usePlugin: false,
  /**
   *Start printing debugging information. The default is false
   */
  debug: true,
  /**
   *It is recommended to turn on the automatic proxy page, which is false by default
   *The SDK is responsible for reporting events such as browse, leave and share
   *You can use sr.page instead of page (sr.page (options))
   *Element event tracking needs to cooperate with autotrack: true
   */
  proxyPage: true,
  /**
   *It is recommended to turn on the component auto agent, and the default is false
   *The SDK is responsible for reporting events such as browse, leave and share
   */
  proxyComponent: true,
  //Suggest to turn on - whether to turn on automatic tracking of page sharing link
  openSdkShareDepth: true,
  //It is recommended to enable element event tracking, report element events automatically, and enter tap, change, longpress, confirm
  autoTrack: true,
})

Learn more about Tencent’s traceless buried point SDK, which supports wechat native applet, taro, mpvue, wepy, uni app: https://mp.zhls.qq.com/youshu-docs/develop/sdk/Taro.html?from=taro
Learn more about “taro x Tencent” https://taro-docs.jd.com/taro/docs/youshu


Welcome to aotu.io

Or focus on the official account of bump Laboratory (AOTULabs).

欢迎关注凹凸实验室公众号