duanli8391 2014-05-18 14:52
浏览 30

为什么我无法在Mixpanel中创建别名?

In Mixpanel I have an user who have the automatic distinct_id 145dsfds-sdfsdf (example). I want to create an alias for that user to 1234

My PHP code:

require ('mixpanel/mixpanel.php');
$original_id = '145dsfds-sdfsdf'; // Example original
$uid = 1234;
$token = '2j34j3j4j3j'; // Token of my project on Mixpanel

$_mp = new Mixpanel($token);
$_mp->createAlias($original_id,  $uid);
$_mp->people->set($uid, array(
    'uid'   => $uid
));

After run, I go into Mixpanel and filter people with id 1234 and retrieve no result. But if we visualize the details of user 145dsfds-sdfsdf, the property uid have value 1234.

I don't understand what's happening.

  • 写回答

1条回答 默认 最新

  • dongma6326 2015-03-30 22:45
    关注

    The root of the issue here is that Mixpanel's alias function is designed to remap the uid to the original_id but not the reverse.

    Essentially, if an alias is successfully made, the distinct_id you see in live-view will be a original_id, not the uid.

    The alias function allows you to tie pre-authentication events to post-authentication events without needing to edit the events already stored in Mixpanel (events are immutable once they are in a project).

    评论

报告相同问题?

悬赏问题

  • ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号