Mixpanel使用Q&A

Boards

  • 每个新用户会自动创建一个教学board
  • boards暂时无法隐藏
  • 删掉inactive user创建的board需要project owner权限

Users

  • ID Management功能(登录前后的用户合并)最多需要24小时才能在mixpanel里完成。在此之前,从Events点进User Activity Feed可能会看到两个页面的distinct id不一致,后者从登录前用户跳转到登录后用户的情况。

To summarize my findings, this is intended behavior as our ID Management takes time to connect your user's events before and after identification.

When you send an event to Mixpanel, it's initially assigned a randomly generated Distinct ID, usually prefixed with "$device." Then, when you identify the user with their unique user ID, Mixpanel may change the user's canonical Distinct ID to either your unique identifier or the random ID. For example, the picture below shows the random ID the event was sent with versus the canonical ID it was switched to:

On your Events page, it still showed that the Distinct ID for this user was $device:19269d0e91f859-079ea5031be25-26001b51-1fa400-19269d0e91f859. This is because it can take up to 24 hours for this connection to be made throughout the rest of Mixpanel. During this time, you can see two separate users with different Distinct IDs:

  • $device:19269d0e91f859-079ea5031be25-26001b51-1fa400-19269d0e91f859
  • df1570a9-9fa0-4592-bb2a-dc6dbb2c627e

 
But clicking the IDs should lead you to the same profile, showing their events before and after they've been identified.

Lexicon

when an event is hidden in Lexicon, it will be excluded from your query results. Specifically, hidden events "will not be included in 'All Events'.

If you want to include hidden events in your queries, you can use "$any_event" instead, which acts like "All Events" but includes hidden events as well.

  • 恶意攻击带来的异常事件和用户如何处理 

To give context, the distinct_id is a unique identifier that Mixpanel uses to track a user across multiple sessions. This identifier can be set by your implementation. While Mixpanel can generate a distinct_id, your application can also set this value, typically to a unique user ID from your database.
 
That said, this indeed doesn't look like valid data. At first glimpse at this, it seems like a user tried injecting an SQL query. This is a common hacking technique where malicious users try to manipulate your application by inserting SQL code.
 
The good news is that Mixpanel does not execute or interpret the event names or properties that are sent! Therefore, SQL injection attacks via event names or profile info should not pose a risk to the data stored in Mixpanel. Sending the events also doesn't give them access to any data in the project.

You can clean up the data via the event deletion tool to remove the specific problematic events. To avoid this type of behavior, you could consider hiding the Mixpanel token, either by moving to a server-side implementation or tracking via a proxy. The doc here goes over those options. 

  • 利用正则表达式从url提取customized property
    • 提取国家:REGEX_EXTRACT(current_url, , "\/(\\w\\w)\/",1))
    • 提取城市:REGEX_EXTRACT(current_url, , "\/\\w\\w\/(.*)\/p\/", 1))
  • drop的事件将不再被追踪和计费,hide的事件仍会追踪计费,但不参与report

Diving right in, dropping an event and hiding an event has different effects: 

  • Dropping an event: When an event is dropped, all events of that type that have previously been ingested (before dropping it) will still show in the interface. However, Mixpanel won’t store any new data for the event or property you select to drop. You cannot recover event data after you drop it.
  • Hiding an event: Unlike dropping data, hiding data does not affect data ingestion; any events/properties that are hidden will continue to be ingested in your project and count toward your data allowance. A hidden entity will not be clearly available in dropdowns. Hidden events will be excluded from your query results. For example, it will not be included in “All Events” and won’t appear as an intermediate step in your Flows report.

Checking the "on University" event, it seems like it was marked as dropped from Nov 6, and then undropped on Nov 18. What this means is that any data sent to Mixpanel between Nov 6 to Nov 18 would not be ingested 😅. In other words, the data during this period would not be recoverable. 

小程序

  • 小程序无法使用mixpanel提供的库

Insight Report

  • how to check latest activity day and event per user

To add a filter like this, you'll use an Aggregate function on the Time property of the '$all_events' metric:
 

  1. First, in the Filter section of the Query Builder, select the Aggregate Property per User filter option from the Computed menu:

  2. Then, select Maximum and, in the Event Selector modal, type '$all_events':

  3. Then, select the 'Time' property and choose 'Day'.

  4. Lastly, typecast the property to a 'Date' data type:

 
You can also get the most recent event performed per user by choosing the Total Events measurement and adding a Breakdown of the Event Name property

  • 平均会话时长 

Funnel Report

  • 查看用户两次行为之间(如果设置成session_start to session_start,则为用户两次会话之间的间隔)的平均转化时间 

Properties属性

  • 一个event property在mixpanel内只能展示为一种数据类型,不建议一个属性在不同的事件里存不同类型的值。可以通过强制设置属性类型,来避免显示not set

Looking into your project, it looks like Select Value is of List type but tracked as String: i.e.

This is typically due to mixed data types being sent for the same property. 
 
If your property is set as a list type in Mixpanel, but some values were sent as strings, those string values will appear as "(not set)" because Mixpanel cannot convert strings to lists. You may want to make sure all Select Value are sent as list type. As a temporary workaround, typecast the property to a string type in your reports

  • referrer和initial referrer

The "referrer" and "initial referrer" are both properties that Mixpanel's Javascript library tracks and appends to any event that a user completes. These are known as super properties.
The "referrer" property indicates the previous page the user was at before the current one. This property changes from page to page as the user navigates through your site.
 
On the other hand, the "initial referrer" is the referring URL at the user's first arrival. It describes the page that the user came from before they visited the first page on your site that had Mixpanel on it. This property is stored in the Mixpanel cookie the first time a user comes to your site and will not change on future site visits as long as the cookie is not cleared.
 
As for your question about manually defining these properties, it's possible to do so. However, it's important to note that these properties are automatically tracked by Mixpanel's Javascript library. If you're not seeing these properties, it could be the users are accessing your site directly (e.g. typing the url in the address bar)
 
If you want to manually set these properties, you can do so using the register method to create super properties. Here's an example:
 

mixpanel.register({
    "referrer": "your_referrer_value",
    "initial referrer": "your_initial_referrer_value"
});

 
Mixpanel sets these properties based on the value of document.referrermixpanel-js/src/utils.js at 3c59a946e71b2e24acd6ba4726b138ca27769147 · mixpanel/mixpanel-js · GitHub
 
This will set the "referrer" and "initial referrer" properties for all future events sent by the current user.

  • 一个event property不能在不同事件中以不同数据类型被追踪

Getting right to it, every property in your Mixpanel project must be uniquely named, and the data type should remain consistent across all events that use that property. 
 
I.e., you should not create a catch-all property like "Product Information" and have this "Product Information" property have a different data type depending on the event it is attached to. So, if you're using a property as an object in one event, you should maintain that data type in all other events where the property is used. The same applies if you're using a property as a list of objects.
 
If you want to use both an object and a list of objects for similar data, you might consider creating two separate properties. For example, you could have "Product Information - Object" and "Product Information - List" as two separate properties.
 
I'll refer you to our documentation on List and Object support here, and I would highly recommend testing out these properties and how they can be used in a Dev or Test project before putting it into production.

  • 对于不标准的值,可以用custom property来修改。比如lower(regex_replace(property, "-","_")) 
  • 对于未定义的值(not set),可以用defined函数来判断;当一个值可能需要多个字段来组合取值时,可以用custom property判断,例如 if(defined(property_a), property_a, property_b)

Project Settings

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值