π‘Tips
- Custom Traffic Segmentation allows developers to configure differentiated ad strategies for different user groups on the HyperBid dashboard by setting user IDs, channels, and custom rules.
setUserId,setChannel,setSubChannel, andsetCustomRulemust all be called beforeMcSdk.initialize().
With Custom Traffic Segmentation, you can:
Use setChannel and setSubChannel to set the channel and sub-channel names for data analysis and strategy configuration by channel dimension on the HyperBid dashboard:
// Must be called before McSdk.initialize()
McSdk.setChannel("your_channel");
McSdk.setSubChannel("your_sub_channel");
π Channel names typically correspond to the app's distribution channels (e.g., app stores, promotion channels, etc.). Sub-channels can be used for more granular differentiation.
Use setUserId to set the unique identifier for the current user for data analysis and strategy configuration by user dimension on the HyperBid dashboard:
// Must be called before McSdk.initialize()
McSdk.setUserId("your user id");
π It is recommended to use the app's unique user identifier (e.g., account ID) as the user ID. Avoid using device IDs or other identifiers that may change.
Use setCustomRule to set custom key-value pairs for traffic segmentation and differentiated strategies on the HyperBid dashboard:
// Must be called before McSdk.initialize()
McSdk.setCustomRule({"key1": "value1", "key2": "value2"});
π The keys and values in custom rules must match the traffic segmentation rules configured on the HyperBid dashboard; otherwise they will not be matched correctly.
| Method | Call Timing | Description |
|---|---|---|
McSdk.setChannel() |
Before initialize |
Set channel name |
McSdk.setSubChannel() |
Before initialize |
Set sub-channel name |
McSdk.setUserId() |
Before initialize |
Set unique user identifier |
McSdk.setCustomRule() |
Before initialize |
Set custom traffic segmentation rules |
π Tip: After setting channel and sub-channel information, you can view data reports and configure differentiated strategies by channel dimension on the HyperBid dashboard.