Spring Boot Mixpanel:如何将属性设置为用户配置文件?

Spring Boot Mixpanel : How to set properties to User profile?

现在我正在编写一个应用程序,使用 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);

如何为该用户配置文件设置属性?

您可以通过 messageBuilder.set

update/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);

阅读更多developer.mixpanel.com