Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add gdpr support to rubicon video in rubiconBidAdapter #2426

Merged

Conversation

moonshells
Copy link
Contributor

Type of change

  • Feature

Description of change

Add GDPR support to video in rubiconBidAdapter

@jsnellbaker jsnellbaker self-assigned this Apr 20, 2018
@jsnellbaker jsnellbaker self-requested a review April 20, 2018 13:50
@jsnellbaker
Copy link
Collaborator

Hi @moonshells Are there any test params I can use to test video delivery? The current test information only contains banner. The code changes look fine to me but I wanted to perform a video delivery to be sure. Thanks.

@moonshells
Copy link
Contributor Author

Following is the test page I used for Prebid.js (Client side) Video. Let me know if this's not something you are looking for.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">

    <title>Prebid.js (Client Side) Video Smoke Test</title>

    <!-- PBJS LINK -->
    <script type="text/javascript" src="/Prebid.js/build/dist/prebid.js" async></script>

    <script src="https://content.jwplatform.com/libraries/UP5t8Jon.js"></script>

    <script>
        var pbjs = pbjs || {};
        pbjs.que = pbjs.que || [];
        // adUnits can support video demand requests by setting 'mediaType' to 'video'.
        var videoAdUnit = {
            code: 'example_video_1',
            sizes: [640, 480],
            //mediaType: 'video',
            mediaTypes : {
                video : {
                    context : 'instream'
                }
            },
            bids: [
                {
                    bidder: 'rubicon',
                    gdprConsent: {
                        consentString: 'BOJ/P2HOJ/P2HABABMAAAAAZ+A==',
                        consentRequired: true
                    },
                    params: {
                        pageUrl: 'http://www.cnn.com',  // optional to set page source
                        accountId: "7780",
                        siteId: "87184",
                        zoneId: "412394",
                        userId: "12346",
                        floor: 0.1,
                        keywords: ["sports", "football", "clothes"],
                        inventory: {rating: ["4-star"], prodtype: ["sports2"]},
                        visitor: {ucat: ["new"], lastsearch: ["football"]},
                        position: 'atf',
                        name: 'map-test-5',
                        video: {
                            language: 'en',
                            playerHeight: 480,
                            playerWidth: 640,
                            size_id: 201
                        }
                    }
                }
            ]
        };

        // run the bid //
        pbjs.que.push(function () {
            pbjs.addAdUnits(videoAdUnit);

            pbjs.requestBids({
                timeout: 3000,
                bidsBackHandler: function (bids) {
                    console.log('bids back', bids);
                    var bidResponse = bids['example_video_1']['bids'][0];

                    if (bidResponse.statusMessage === 'Bid available') {
                        var masterTagUrl1 = pbjs.adServers.dfp.buildVideoUrl({
                            adUnit: videoAdUnit,
                            params: {
                                iu: '/112115922/prebid_video'
                            }
                        });
                        console.log('mastertag1', masterTagUrl1);

                        var jwPlayerInstance1 = jwplayer("playercontainer1");
                        jwPlayerInstance1.setup({
                            file: "//sneezy.aws.rubiconproject.com/rp-eng-soln/video/_apex-jw/video/silence.mp4",
                            height: 360,
                            width: 640,
                            primary: 'html5',
                            advertising: {
                                client: 'vast',
                            }
                        });

                        jwPlayerInstance1.on('beforePlay', function () {
                            jwPlayerInstance1.playAd(masterTagUrl1);
                        })
                    }
                }
            });
        });

    </script>
</head>
<body>

<h1>Video</h1>
<div id="playercontainer1">

</div>
</body>
</html>

Copy link
Collaborator

@jsnellbaker jsnellbaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jsnellbaker jsnellbaker merged commit a48df1e into prebid:master Apr 20, 2018
@moonshells moonshells deleted the rubicon_video_gdpr_support branch April 20, 2018 20:11
dluxemburg pushed a commit to Genius/Prebid.js that referenced this pull request Jul 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants