现在我正在编写一个应用程序,使用 Spring Boot 将事件发送到 Mixpanel,目前只能设置事件属性,而不能设置用户配置文件。 MessageBuilder messages = new MessageBuilder("my token"); JSONObject eventProp = new JSONObject(); eventProp.put("City", "Phnom Penh"); JSONObject event = messages.event("joe@gribbl.com", "Logged In", eventProp); ClientDelivery delivery = new ClientDelivery(); delivery.addMessage(event); MixpanelAPI mixpanel = new MixpanelAPI(); mixpanel.deliver(delivery);如何设置该用户配置文件的属性?
1 回答
动漫人物
TA贡献1815条经验 获得超10个赞
您可以通过messageBuilder.set更新/设置人员的属性
MessageBuilder messages = new MessageBuilder("my token"); // prepare event properties JSONObject eventProp = new JSONObject(); eventProp.put("City", "Phnom Penh"); JSONObject event = messages.event("joe@gribbl.com", "Logged In", eventProp); // prepare people properties JSONObject peopleProp = new JSONObject(); peopleProp.put("Full Name", "Cheav Sovannarith"); JSONObject people = messages.event("joe@gribbl.com", peopleProp); ClientDelivery delivery = new ClientDelivery(); delivery.addMessage(event); delivery.addMessage(people); MixpanelAPI mixpanel = new MixpanelAPI(); mixpanel.deliver(delivery);
添加回答
举报
0/150
提交
取消