Baidu applets embedded code ocpc

A reference link

oCPC applet Buried Reference: http: //oCPC.baidu.com/developer/d/guide/ iurl = smartprogram% 2Fsdk-install% 2F,?
  1. 小程序根目录下安装 :npm install angelia-swan
  2.   app.js global introduction and initialize
  const angelia = require('angelia-swan');
  angelia.init();
3.页面引入并使用
const angelia = require('angelia-swan');
/**
* dial number
*/
_makeCall: function (e) {
angelia.log ({
convertType: 2  
// 1: Consulting 2: Telephone 3: Form submitted successfully
});
...functional module
}
二,测试是否埋点成功,接口为https://pimlog.baidu.com/mapp/advlog 状态码200,则为成功

 

 


注意点:安装
angelia-swan版本必须在0.0.8以上,如果引入报错 把调试基础库版本调高再测试,至少在3.15.135以上
 

Guess you like

Origin www.cnblogs.com/937522zy/p/11797191.html