You need to enable JavaScript to run this app.
Growth Analysis (Privatization)

Growth Analysis (Privatization)

Copy page
Download PDF
Basic Concepts
Passive and Relational Events
Copy page
Download PDF
Passive and Relational Events

1. Overview

Active and passive events are behavioral descriptions based on the user's active initiation and passive influence. In certain business scenarios, a user may be both the initiator of an action and the recipient who is affected by it. The behavior triggered by the initiator is called an "active event," while the behavior affecting the recipient is called a "passive event." When an active event and a passive event correspond to each other and appear as a pair, they are referred to as a "relational event."

1.1 Typical scenario: social applications

  • Scenario 1: User A followed user B.
    User A was the initiator of the follow action and triggered an active event. User B was the recipient of the follow action and was passively affected by the event.
    • Active event: User A followed user B.
    • Passive event: User B was followed by user A.
      The active event and passive event correspond to each other and appear as a pair in this scenario, thus forming a "relational event."
  • Scenario 2: User A sent a message to user B.
    • Active event: User A sent one message.
    • Passive event: User B received one message.
  • Scenario 3: User A sent a red envelope to user B.
    • Active event: User A sent one red envelope.
    • Passive event: User B received a red envelope.

More scenarios: Like and be liked, comment and be commented, complain and be complained about, share content and receive content, and so on.

1.2 Special scenario

Scenario description: The system pushed notifications to users, customer service sent a coupon to a user during complaint resolution, or a program triggered a message sent to a user.
Because active and passive events are based on the user, there is no active event in this scenario, as the action is not initiated by the user. The user is the recipient of the action and is passively affected, so only passive events exist.
Passive event: The user received a notification / the user received a coupon / the user received a push message.

2. Conversion analysis

In the scenario where users mutually follow each other, the relationship events are shown in the table below.

Event ID

Event name

User ID

Target object ID

Initiator object ID

Passive

Relationship

Semantics

1

subscribe

A

B

null

No

Yes

A follows B

2

$inactive_subscribe

B

null

A

Yes

Yes

B is followed by A

3

subscribe

B

A

null

No

No

B follows A

To calculate the proportion of follow-backs, passive events are required. The funnel is constructed as follows:
Step 1: $inactive_subscribe, associate the initiator object ID.
Step 2: subscribe, associate the target object ID (since list-type associated attributes are not currently supported, users need to report a target object ID themselves in this scenario).
Other condition: group by user ID.

3. Event and attribute changes

Compared with active events, relationship events and passive events have additional preset attributes for differentiation. The main differences are shown in the table below:

Event name

Preset attribute

Display name

Preset attribute type

Value description

Active event (relationship)

event_name

$target_uuid_list

Passive event UUID

list

Manually report user ID

$inline

Whether it is a relationship event

string

true or any other value

Passive event (relationship)

$inactive_{event_name}

$inactive

Whether it is a passive event

string

true or any other value

$inline

Whether it is a relationship event

string

true or any other value

$source_uuid

Active event UUID

string

UUID of the corresponding relationship event

Passive event (manual)

Custom

$inactive

Whether it is a passive event

string

true or any other value

When users mark the current event as a relationship event (with $inline set to "true") in an active event, the system will automatically generate the corresponding passive event. The system-generated passive event will have an additional preset attribute: "$source_uuid", which is the uuid of the user who triggered the active event.

4. Frequently asked questions

4.1 How to distinguish between active and passive events?

The $inactive attribute of a passive event has a value of true. Note that the data type of this attribute is currently string, not boolean.
When reporting a relationship event, the system will automatically generate a passive event. The system-generated passive event will not only have the above preset attributes, but will also include the $inline = "true" and $source_uuid (with the value being the corresponding active event uuid) attributes. In addition, the event name will automatically have the "$inactive_" prefix added.

4.2 Will passive events affect billing data calculations?

Passive events are included by default when calculating event consumption, but are not included when calculating MAU and DAU. Disabled passive events will also not generate consumption.

4.3 When reporting a relationship event, if $target_uuid_list contains multiple uuids, will multiple passive events be generated?

Yes. $target_uuid_list is a list attribute and supports passing multiple uuids. The system will automatically generate a corresponding passive event for each user affected by the event.

5. Data reporting

We provide a method to automatically generate the corresponding passive event when a user triggers an active event.
To distinguish between active and passive events, we have added the public event property $inactive. When $inactive is true, the corresponding event is a passive event.

Attribute name

Data type

Value range

$inactive

string

"true" Passive event.
"false" Active event.
Otherwise, it is not a passive event and can also be considered an active event.

5.1 Android

5.1.1 Automatically generate relationship events

Sample code: "Relationship event"

new ActionButton (
    "关联事件", // which means "related events"
    new Action ()
    {
        @Override public void doAction ()
        {
            JSONObject param = new JSONObject ();
            try {
                param.put ( "video_id", Generator.getRandomNum ( 0, 10000000 ) );
                param.put ( "category", "主动被动事件" ); // which means "active passive events"
                param.put ( "author_id", Generator.getRandomNum ( 0, 10000 ) );
                param.put ( "$inline", "true" );
                JSONArray uuid_list = new JSONArray ();
                for (int i = 0; i < Generator.getRandomNum ( 0, 10 ); i++)
                {
                    uuid_list.put ( Generator.getRandomNum ( 10000, 99999 ) );
                }
                param.put ( "$target_uuid_list", uuid_list );
            }
            catch (JSONException e)
            { e.printStackTrace (); }
            AppLog.onEventV3 ( "like", param );
        }
    }
)

5.1.2 Manually report passive events

Sample code: "Passive event"

new ActionButton (
    "被动事件", // which means "passive events"
    new Action ()
    {
        @Override public void doAction ()
        {
            JSONObject param = new JSONObject ();
            try {
                param.put ( "video_id", Generator.getRandomNum ( 0, 10000000 ) );
                param.put ( "category", "主动被动事件" ); // which means "active passive events"
                param.put ( "author_id", Generator.getRandomNum ( 0, 10000 ) );
                param.put ( "$inactive", "true" );
            }
            catch (JSONException e)
            { e.printStackTrace (); }
            AppLog.onEventV3 ( "like", param );
        }
    }
)

5.2 iOS

5.2.1 Sample code: "Active event"

[BDAutoTrack eventV3:@"like" params:@{
    @"video_title": @"Lady Gaga on Oscar",
    @"category" : @"主动被动事件", // which means "active passive events"
    @"$inactive" : @"false"
}];

5.2.2 Automatically generate relationship events

Sample code: "Relationship event"

[BDAutoTrack eventV3:@"like" params:@{
    @"video_title": @"Lady Gaga on Oscar",
    @"category" : @"主动被动事件", // which means "active passive events"
    @"$inactive" : @"true",
    @"$inline": @"true",
    @"$target_uuid_list" : @[@"123", @"456", @"789"]
}];

5.2.3 Manually report passive events

Sample code: "Passive event"

[BDAutoTrack eventV3:@"like" params:@{
    @"video_title": @"Lady Gaga on Oscar",
    @"category" : @"主动被动事件", // which means "active passive events"
    @"$inactive" : @"true"
}];

5.3 JSSDK

5.3.1 Sample code: "Active event"

window.collectEvent('like', {
   from: "index",
   category: "主动被动事件", // which means "active passive events"
   $inactive: "false" 
});

5.3.2 Automatically generate relationship events

Sample code: "Relationship event"

window.collectEvent('like', {
   from: "index",
   category: "主动被动事件", // which means "active passive events"
   $inactive: "true" ,
   $inline: "true",
   $target_uuid_list: ["123","456","789"]
});

5.3.3 Manually report passive events

Sample code: "Passive event"

window.collectEvent('like', {
   from: "index",
   category: "主动被动事件", // which means "active passive events"
   $inactive: "true" ,
});

5.4 Mini Program SDK

5.4.1 Sample code: "Active event"

app.$$Rangers.event('like', {
    from: "index",
   category: "主动被动事件", // which means "active passive events"
   $inactive: "false",
})

5.4.2 Automatically generate relationship events

Sample code: "Relationship event"

app.$$Rangers.event('like', {
   from: "index",
   category: "主动被动事件", // which means "active passive events"
   $inactive: "true" ,
   $inline: "true",
   $target_uuid_list: ["123","456","789"]
});

5.4.3 Manually report passive events

Sample code: "Passive event"

app.$$Rangers.event('like', {
   from: "index",
   category: "主动被动事件", // which means "active passive events"
   $inactive: "true" 
}); 

5.5 HTTP API server-side reporting

5.5.1 Sample code: "Active event"

{
    "user": {
        // It is recommended to first report the user_unique_id of the user on the client side, and then use it on the server side
        "user_unique_id": " 74481585297"   //User unique identifier
    },
    "header": {
        "app_channel": "App Store"   //App channel
    },
    "events": [
        {
            "event": "like",    //event name
            "params": "{
                \"category\":\"主动被动事件\", // which means "active passive events"
                \"$inactive\":\"false\"
             }",    //event attributes
            "local_time_ms": 1489573628001   //The timestamp of the event occurrence
        }
    ]
}

5.5.2 Automatically generate relationship events

Sample code: "Relationship event"

{
    "user": {
        // It is recommended to first report the user_unique_id of the user on the client side, and then use it on the server side
        "user_unique_id": " 74481585297"   //User unique identifier
    },
    "header": {
        "app_channel": "App Store"   //App channel
    },
    "events": [
        {
            "event": "like",    //event name
            "params": "{
                \"category\":\"主动被动事件\", // which means "active passive events"
                \"$inactive\":\"true\",
                \\"$inline\\":\\"true\\",
                \"$target_uuid_list\":[\"123\",\"456\",\"789\"]
             }",    //event attributes
            "local_time_ms": 1489573628001   //The timestamp of the event occurrence
        }
    ]
}

5.5.3 Manually report passive events

Sample code: "Passive event"

{
    "user": {
        // It is recommended to first report the user_unique_id of the user on the client side, and then use it on the server side
        "user_unique_id": " 74481585297"   //User unique identifier
    },
    "header": {
        "app_channel": "App Store"    //App channel
    },
    "events": [
        {
            "event": "like",    //event name
            "params": "{
                \"category\":\"主动被动事件\", // which means "active passive events"
                \"$inactive\":\"true\"
             }",    //event attributes
            "local_time_ms": 1489573628001   //The timestamp of the event occurrence
        }
    ]
}
Last updated: 2026.08.25 11:32:14