首页 > 解决方案 > Branch.io 深度链接 webhook:测试和直播模式之间的事件内容不同

问题描述

我正在尝试使用带有网络挂钩的 branch.io 深层链接添加推荐功能。因此,我按照文档(https://docs.branch.io/apps/deep-linking-api/#webhook-create)创建了网络挂钩,并设置了服务器以监听分支事件。一切都很好,直到在生产环境中进行测试。

实际上,我的问题是分支在实时模式下发送的事件比在测试模式下发送的事件更短。上面,您可以看到在调试中触发的示例事件,然后在发布中触发相同的事件。

{
    "metadata": {
        some metadata
    },
    "os": "Android",
    "os_version": "28",
    "first_referring_click_timestamp": "2019-11-18T16:27:19.708Z",
    "session_referring_identity": "referrer identity here",
    "event_timestamp": "2019-11-18T16:27:28.069Z",
    "ad_tracking_enabled": "false",
    "first_referring_identity": "referrer identity here",
    "session_referring_click_timestamp": "2019-11-18T16:27:19.708Z",
    "identity": "new user identity here",
    "session_referring_click_id": 725011506093376000,
    "first_referring_link_data": {
        "date_ms": 1574093470987,
        "date_sec": 1574093470,
        "date": "2019-11-18T16:11:10.987Z",
        "data": {
            "$og_title": "My title",
            "$publicly_indexable": "false",
            "~creation_source": 2,
            "$og_description": "My description",
            "source": "android",
            "$identity_id": "705413318433314220",
            "~stage": "new referral link",
            "$og_image_url": "http://www.lorempixel.com/400/400/",
            "~feature": "sharing",
            "+url": "the referral link",
            "$one_time_use": false,
            "~id": "725007442983731359",
            "~campaign": "referral",
            "~channel": "referral"
        },
        "feature": "sharing",
        "stage": "new referral link",
        "branch_id": "725007442983731359",
        "channel": "referral",
        "campaign": "referral",
        "state": 1
    },
    "event": "test_sign-up",
    "session_referring_link_data": {
        "date_ms": 1574093470987,
        "date_sec": 1574093470,
        "date": "2019-11-18T16:11:10.987Z",
        "data": {
            "$og_title": "My title",
            "$publicly_indexable": "false",
            "~creation_source": 2,
            "$og_description": "My description",
            "source": "android",
            "$identity_id": "705413318433314220",
            "~stage": "new referral link",
            "$og_image_url": "http://www.lorempixel.com/400/400/",
            "~feature": "sharing",
            "+url": "the referral link",
            "$one_time_use": false,
            "~id": "725007442983731359",
            "~campaign": "referral",
            "~channel": "referral"
        },
        "feature": "sharing",
        "stage": "new referral link",
        "branch_id": "725007442983731359",
        "channel": "referral",
        "campaign": "referral",
        "state": 1
    }
}

直播模式下的活动

{ 
    metadata: { some metadata},
    os: 'Android',
    identity: 'new user identity',
    google_advertising_id: 'google id',
    os_version: '28',
    event: 'test_sign-up',
    event_timestamp: '2019-11-26T11:33:24.321Z',
    hardware_id: 'google id',
    ad_tracking_enabled: 'true' 
}

所以,我的问题是,我如何才能在实时模式下至少拥有“session_referring_identity”字段?

有关信息,事件是从原生 Android 应用程序发送的,链接是测试模式的测试链接和实时模式的实时链接。此外,推荐链接包含推荐人的身份,例如,如果我使用 REST API,我可以检索生成深度链接的用户的身份。

提前致谢。

标签: webhooksdeep-linkingbranch.ioreferrals

解决方案


对于那些有同样问题的人,这里是来自 branch.io 支持服务的响应:

很抱歉,我们不再支持推荐规则的“type=web_hook”。因此,请使用“type=credit”作为推荐规则,创建新规则后,您可以在仪表板的“推荐规则”页面下找到规则。


推荐阅读