方法一:通过URL传入客户身份识别的
使用方法:
- 作品链接上加previewer=mp和userInfo这两个参数;
- 在userInfo参数中传入平台标识和身份信息;
previewer字段说明
表明访问环境,支持的参数值有:mp、app。
- 当参数值为mp,表示小程序环境
- 当参数值为app,表示App环境
用户务必留意自己活动投放的环境。
userInfo字段说明
字段 | 类型 | 描述 |
userInfo | object | 身份信息 |
identitys | object[] | 多组身份信息 ,最大支持3组身份信息 |
identityType | string | 身份类型:openid=微信环境下的openid、unionid=微信环境下的unionid,fans_id=有赞商城识别id,支持自定义类型标识 |
identityValue | string | 身份类型对应的id取值 |
mpid | string | 微信公众号appid或小程序appid或自建应用id等 |
platform | string | 平台标识,公众号/小程序(gzh)、自建应用(external) |
isWeChatEcosystem | boolean | 是否微信生态,true是 false否 |
说明:identitys必需且至少一组身份数据,否则建档失败。identityType的取值为“工作台”->“用户”->“用户身份管理”中的”用户身份id“配置。
数据结构:
{ "userInfo":{ "identitys":[ { "identityType":"openid", "identityValue":"openid-xxxx-xxxxx-xxxxx-xxxxx", "mpid":"wxappid", "platform":"gzh", "isWeChatEcosystem":true }, { "identityType":"unionid", "identityValue":"unionid-xxxx-xxxxx-xxxxx-xxxxx", "mpid":"wxappid", "platform":"gzh", "isWeChatEcosystem":true }, { "identityType":"memberNo", "identityValue":"member-no-xxxx-xxxxx-xxxxx-xxxxx", "mpid":"应用id", "isWeChatEcosystem":false }, { "identityType":"phone", "identityValue":"188xxxxxxxx" } ] } }
如果有其它的身份信息,也可以附加在userInfo内进行上报,例如微信环境下
{ "userInfo":{ "identitys":[ { "identityType":"openid", "identityValue":"openid-xxxx-xxxxx-xxxxx-xxxxx", "mpid":"wxappid", "platform":"gzh", "isWeChatEcosystem":true }, { "identityType":"unionid", "identityValue":"unionid-xxxx-xxxxx-xxxxx-xxxxx", "mpid":"wxappid", "platform":"gzh", "isWeChatEcosystem":true }, { "identityType":"memberNo", "identityValue":"member-no-xxxx-xxxxx-xxxxx-xxxxx", "mpid":"应用id", "isWeChatEcosystem":false }, { "identityType":"phone", "identityValue":"188xxxxxxxx" } ], "nickname": "xxxx", "headimgurl": "xxxx", "sex": "0", } }
url地址带参示范
访问转换后url地址,验证上报参数
方法二:通过斐波SDK传入客户身份识别的数据
具体查看文档:H5-SDK