页面转发 page_share_app_message
定义
在小程序页面生命周期回调 Page.onShareAppMessage 触发时上报
数据规范
分享维度属性
名称 | 类型 | 描述 |
---|---|---|
from_type 必填 | enum |
转发事件来源
|
share_title 必填 | string |
转发标题 |
share_path | string |
转发页面路径,不填默认是当前页面 |
share_image_url | string |
转发图片路径 |
公共基础属性
名称 | 类型 | 描述 |
---|---|---|
page 必填 | string |
行为发生的小程序页面路径,开头不要加 |
page_title | string |
行为发生的小程序页面标题 例商品详情、商城首页 |
sr_sdk_version | string |
sdk版本号 例1.1.6 |
time 必填 | datetime |
行为发生时间 例1560409473714 |
wx_user 必填 | object |
用户相关属性 |
app_id 必填 | string |
公众号或小程序唯一标识 例wx9d4f5f22pa099f82 |
open_id 必填 | string |
微信用户在小程序下的唯一标识符 例ogN6X0T-ilsH-XmIdzXtuR1f1r3Q |
user_id | string |
用户在商户的唯一标识符 例548019854034 |
union_id | string |
微信用户在开放平台账号下的唯一标识符 例o6_bmlsdaXds8d6_sgVt7hM3OPfL |
local_id | string |
用户在有数的唯一标识符 例360b8853-64bf-3fba-e9a0-5abb1e4d7721 |
tag | object[] |
用户的个性化标签 |
tag_id 必填 | string |
标签ID,唯一标识符 例游客 |
tag_name 必填 | string |
标签名称 例游客 |
extra | object | |
chan 必填 | object |
渠道相关属性 |
chan_wxapp_scene 必填 | int |
小程序场景值,必填 例1037 |
chan_id | string |
引流渠道的标识符 |
chan_refer_app_id | string |
来源小程序或公众号appid 例wx9d6f5f6gea059654 |
chan_shop_id | string |
门店ID,若需要计算门店业务则必填 |
chan_shop_name | string |
门店名称,展示字段,若chan_shop_id存在则必填 |
chan_custom | object |
自定义渠道 |
chan_custom_id 必填 | string |
4级自定义渠道的标识符,4级是自定义渠道的最小粒度 例mp-article-12375 |
chan_custom_id_desc 必填 | string |
4级自定义渠道的描述 例公众号文章(id=12375) |
chan_custom_cat_3 必填 | string |
3级自定义渠道的标识符,3级是针对4级的分类,要求4级数据必须存在 例mp-article |
chan_custom_cat_3_desc 必填 | string |
3级自定义渠道的描述,若chan_custom_cat_3存在则必须存在 例公众号文章 |
chan_custom_cat_2 必填 | string |
2级自定义渠道的标识符,2级是针对3级的分类,要求34级数据必须存在 例media |
chan_custom_cat_2_desc 必填 | string |
2级自定义渠道的描述,若chan_custom_cat_2存在则必须存在 例媒体 |
chan_custom_cat_1 必填 | string |
1级自定义渠道的标识符,1级是针对2级的分类,要求234级数据必须存在 例wechat |
chan_custom_cat_1_desc 必填 | string |
1级自定义渠道的描述,若chan_custom_cat_1存在则必须存在 例微信 |
extra | object | |
component | object |
组件是视图上的一个区块元素 |
component_id | string |
组件ID |
component_name | string |
组件名称 |
请求示例
let body = {
"type": "page_share_app_message",
"props": {
"from_type": "button",
"share_title": "11",
"share_path": "",
"share_image_url": "",
"page": "pages/product?sku_id=AOdjf7u",
"page_title": "商品详情、商城首页",
"time": "1560409473714",
"wx_user": {
"app_id": "wx9d4f5f22pa099f82",
"open_id": "ogN6X0T-ilsH-XmIdzXtuR1f1r3Q",
"user_id": "548019854034",
"union_id": "o6_bmlsdaXds8d6_sgVt7hM3OPfL",
"local_id": "360b8853-64bf-3fba-e9a0-5abb1e4d7721",
"tag": [
{
"tag_id": "游客",
"tag_name": "游客"
}
]
},
"chan": {
"chan_wxapp_scene": 1037,
"chan_id": "",
"chan_refer_app_id": "wx9d6f5f6gea059654",
"chan_shop_id": "",
"chan_shop_name": "",
"chan_custom": {
"chan_custom_id": "mp-article-12375",
"chan_custom_id_desc": "公众号文章(id=12375)",
"chan_custom_cat_3": "mp-article",
"chan_custom_cat_3_desc": "公众号文章",
"chan_custom_cat_2": "media",
"chan_custom_cat_2_desc": "媒体",
"chan_custom_cat_1": "wechat",
"chan_custom_cat_1_desc": "微信"
}
},
"component": {
"component_id": "",
"component_name": ""
}
}
}
wx.request({
url: "https://zhls.qq.com/api/report?app_id=APPID×tamp=TIMESTAMP&nonce=NONCE",
method: "post",
data: body,
success(res) {
console.log(res)
}
})
Copyright © 1998-2019 Tencent. All Rights Reserved.