Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Elevate your video Broadcasts with Video viewing complete event

Elevate your video Broadcasts with Video viewing complete event

LINE Developers Thailand

September 22, 2023
Tweet

More Decks by LINE Developers Thailand

Other Decks in Technology

Transcript

  1. Elevate your video Broadcasts
    with Video viewing complete event

    View full-size slide

  2. อยากใ
    ห้
    คน
    ดู

    ห้
    จบ?
    ดู
    จบ
    มั

    ย?

    View full-size slide

  3. Mission
    Re-Targeting Boost Up
    Tracking
    Elevate your video Broadcasts

    View full-size slide

  4. 1st Mission
    Tracking

    View full-size slide

  5. Tracking
    1st Mission
    Webhook
    Broadcast

    View full-size slide

  6. Broadcast with Messaging API
    POST https://api.line.me/v2/bot/message/broadcast
    {
    "messages": [
    ]
    }
    {
    "type": "video",
    "originalContentUrl": "https://example.com/original.mp4",
    "previewImageUrl": "https://example.com/preview.jpg",
    “trackingId": "track-id"
    } ,
    {
    "type": "text",
    "text": “New Feature!! ดูวีดีโอจบ รับคะแนนไปเลย 🎉"
    }

    View full-size slide

  7. Webhook - VideoPlayComplete
    LINE
    Server
    {
    "destination": “xxxxxxxxxx",
    "events": [
    {
    "replyToken": “nHuyWiB7y…CTA”,
    "type": “videoPlayComplete",
    "mode": "active",
    "timestamp": 1462629479859,
    "source": {
    "type": "user",
    "userId": "U4af4980629..."
    },
    "videoPlayComplete": {
    "trackingId": "track-id"
    }
    }
    ]
    Your
    Server
    Webhook Event
    Viewing Complete 😊

    View full-size slide

  8. Your
    Server
    Insert data to BigQuery

    View full-size slide

  9. Preview Data with Looker
    Finish 1st Mission

    View full-size slide

  10. 2nd Mission
    Re-Targeting

    View full-size slide

  11. Re-Targeting
    2nd Mission
    Broadcast
    Narrowcast

    View full-size slide

  12. Create Audience from LINE OA Manager

    View full-size slide

  13. Broadcast from LINE OA Manager

    View full-size slide

  14. Create Audience Group
    POST https://api-data.line.me/v2/bot/audienceGroup/upload/byFile
    Request body
    {
    “description": “viewing_video_complete”
    “file": “@audiences.txt;type=text/plain”
    }
    Request headers
    {
    “Authorization": “Bearer {channel access token}”
    “Content-Type“: “multipart/form-data”
    }
    audiences.txt “audienceGroupId“: “8672903….”

    View full-size slide

  15. Check Audience Status
    POST https://api.line.me/v2/bot/audienceGroup/{audienceGroupId}
    {
    "audienceGroup": {
    "audienceGroupId": 1234567890123,
    "type": "UPLOAD",
    "description": "audienceGroupName_01",
    "status": "READY",
    "audienceCount": 1887,
    "created": 1608617466
    }
    }

    View full-size slide

  16. Send Message via Narrowcast
    POST https://api-data.line.me/v2/bot/message/narrowcast
    {
    “messages": [
    {
    “type": “text”
    “text”: “ติดตามรายละเอียดเพิ่มเติมไ
    ด้
    ที่...”
    }
    ],
    “recipient“: {
    “type": “audience”
    “audienceGroupId”: “5614991076”
    },
    “limit“: {
    “max": 100
    “upToRemainingQuota”: true
    }
    }

    View full-size slide

  17. NarrowCast
    Audience
    Age
    Gender
    Device
    Area
    Sub

    View full-size slide

  18. {
    "messages": [
    {
    "type": "text",
    "text": "test message"
    }
    ],
    "recipient": {
    "type": "audience",
    "audienceGroupId": 5614991076
    },
    "limit": {
    "max": 100,
    "upToRemainingQuota": true
    }
    }
    Viewer Complete
    {
    "messages": [
    {
    "type": "text",
    "text": "test message"
    }
    ],
    "recipient": {
    "type": "audience",
    "audienceGroupId": 5614991076
    },
    "limit": {
    "max": 100,
    "upToRemainingQuota": true
    }
    }
    + Only Female
    "filter": {
    “demographic": {
    "type": “operator",
    “and”: [
    {
    "type": “gender”,
    "oneOf": [
    “female”
    ]
    }
    ]
    }
    },
    + Only Age between 35 - 40
    {
    "messages": [
    {
    "type": "text",
    "text": "test message"
    }
    ],
    "recipient": {
    "type": "audience",
    "audienceGroupId": 5614991076
    },
    "filter": {
    “demographic": {
    "type": “operator",
    “and”: [
    {
    "type": “gender”,
    "oneOf": [
    “female”
    ]
    },
    ]
    }
    },
    {
    "type": “age”,
    "gte": “age_35”,
    "lt": “age_40”
    }

    View full-size slide

  19. 3rd Mission
    Boost up

    View full-size slide

  20. Boostup
    Viewing Complete 😊
    Integrate with Loyalty
    Congratulation
    Message
    Get Point
    Reward Redeem

    View full-size slide

  21. Integrate with Loyalty
    https://betask-loyalty-app.web.app/system/register

    View full-size slide

  22. Generate Token
    Integrate with Loyalty

    View full-size slide

  23. Call API video-activity
    Integrate with Loyalty
    Webhoo
    k
    Viewing Complete 😊
    POST https://api.beloyalty.betaskthai.com/video-activity
    Request headers
    {
    "apiToken": “f8e5d2c4787fddf3….”,
    }
    Request body
    {
    "lineUserId": “U4af4980629….”,
    "shopId": “U123fxxxxx….”,
    "replyToken": “nHuyWiB7y..XCTA”,
    }

    View full-size slide

  24. Summary
    1st Mission
    Tracking
    2nd Mission
    Re-Tageting
    3rd Mission
    Boost up
    Loyalty

    View full-size slide

  25. Send Course
    Another Use case
    E-Learning
    Send Exam Do Exam Send Certificate

    View full-size slide

  26. Note
    Flex Message Imagemap Message

    View full-size slide

  27. Pamorn Trivorrarat (Golf)
    LINE API Expert
    CTO - BeTask Consulting
    THANK YOU

    View full-size slide