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 apstream adapter #5508

Merged
merged 4 commits into from
Aug 4, 2020
Merged

Add apstream adapter #5508

merged 4 commits into from
Aug 4, 2020

Conversation

frstua
Copy link
Contributor

@frstua frstua commented Jul 17, 2020

Type of change

  • New bidder adapter

Description of change

  • test parameters for validating bids

Inherit from prebid.js

    var adUnits = [
      {
        code: '/19968336/header-bid-tag-1',
        mediaTypes: { // mandatory and should be only one
            banner: {
                sizes: [[920,180], [920, 130]]
            }
        },
        bids: [{
            bidder: 'apstream',
            params: {
                publisherId: STREAM_PIBLISHER_ID // mandatory
            }
        }]
      }
    ];

Explicit ad-unit code

    var website = null;
    switch (location.hostname) { 
      case "site1.com": 
        website = "S1"; 
        break;
      case "site2.com":
        website = "S2";
        break;
    }
    
    var adUnits = [
      {
        code: '/19968336/header-bid-tag-1',
        mediaTypes: { // mandatory and should be only one
            banner: {
                sizes: [[920,180], [920, 130]]
            }
        },
        bids: [{
            bidder: 'apstream',
            params: {
                publisherId: STREAM_PIBLISHER_ID, // mandatory
                code: website + '_Leaderboard'
            }
        }]
      }
    ];

Explicit ad-unit ID

    var adUnits = [
      {
        code: '/19968336/header-bid-tag-1',
        mediaTypes: { // mandatory and should be only one
            banner: {
                sizes: [[920,180], [920, 130]]
            }
        },
        bids: [{
            bidder: 'apstream',
            params: {
                publisherId: STREAM_PIBLISHER_ID, // mandatory
                adunitId: 1234
            }
        }]
      }
    ];

Be sure to test the integration with your adserver using the Hello World sample page.

For any changes that affect user-facing APIs or example code documented on http://prebid.org, please provide:

Other information

@patmmccann
Copy link
Collaborator

your adapter submissions shouldnt be adding 100k lines to prebid.js or changing index.html

@frstua
Copy link
Contributor Author

frstua commented Jul 17, 2020

Wrong files got in commit. Fix already. But now tests failed because another adapter. Can I somehow rerun tests?

@frstua
Copy link
Contributor Author

frstua commented Jul 22, 2020

Tests failed by reason not related to my adapter. Do I have possibility to rerun tests manually?

@aleksatr
Copy link
Contributor

hey @frstua , I don't see the link to the docs PR: https://github.com/prebid/prebid.github.io/

@frstua
Copy link
Contributor Author

frstua commented Jul 23, 2020

Here is the link to the docs: prebid/prebid.github.io#2141

@frstua
Copy link
Contributor Author

frstua commented Jul 23, 2020

Sorry, can't find where us_privacy was mentioned.

@aleksatr
Copy link
Contributor

Sorry, can't find where us_privacy was mentioned.

Sorry, my bad, I must have seen gdpr_supported and thought that I saw us_privacy, removing the comment.

@frstua
Copy link
Contributor Author

frstua commented Jul 28, 2020

Hi @aleksatr. All corrections have been made.

};

const isConsent = getIabConsentString(bidderRequest);
if (isConsent) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you add a bidder config option here and document it so that pubs who aren't comfortable with this functionality can disable the dsu part of your adapter? I think it is okay to default to on but should be on the bidder params section of the documentation at http://prebid.org/dev-docs/bidders.html

Copy link
Collaborator

Choose a reason for hiding this comment

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

noting from the module rules:

"Bidder modules must not(*) make requests to endpoints for functionality other than auctions without:
Disclosure (See the disclosure section below.)
Ability for the publisher to control the additional functionality."

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @patmmccann. We are not making any requests to endpoints related to DSU. As I can see in the docs, this rule is applied only for requests to endpoints for functionality other than auctions. In our case DSU just identify user and is generated on client side, this is a part of our workflow. Also it uses local storage only if consent is given.

Copy link
Collaborator

@patmmccann patmmccann Jul 31, 2020

Choose a reason for hiding this comment

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

I think publishers being able to control this additional functionality (generate and pass dsu) aligns quite well with module rules. The idea is some publishers are subject to regulatory scrutiny or have stronger internal standards and may wish to control this functionality at a more detailed level than (isconsent) and may wish to check for consent for various tcf2 purposes and different publishers may want to handle purpoe 4 consent in quite different ways.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @patmmccann. Where is better place to set this parameter? I can add this option to params section to every bid, but does it makes sense as far this DSU flag is browser specific but not bid specific? Does it means what I should take into account parameter only from first bit or what do you could suggest?

Copy link
Collaborator

@patmmccann patmmccann Aug 3, 2020

Choose a reason for hiding this comment

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

I imagine a publisher would do something like: var adUnits = [{ code: 'test-div', sizes: [[300, 600]], bids: [{ bidder: 'apstream', params: { dsu: 'off' //defaults to on } }] }]; when they want to override the dsu behavior in some context

Copy link
Collaborator

Choose a reason for hiding this comment

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

There's precedence for bidder-specific global params. e.g.

pbjs.setConfig({
   apstream: {dsu: false}
});

Your code can do a getConfig to look for this optional param.

@frstua
Copy link
Contributor Author

frstua commented Aug 4, 2020

Hi @patmmccann @aleksatr.

I added possibility to disable DSU via config section. Also docs have been updated.

Is it possible to merge it today as we have publisher and he is waiting for adapter.

@aleksatr aleksatr added the LGTM label Aug 4, 2020
@aleksatr
Copy link
Contributor

aleksatr commented Aug 4, 2020

LGTM

@aleksatr aleksatr merged commit b4b77af into prebid:master Aug 4, 2020
@romanych
Copy link

romanych commented Aug 6, 2020

Hi @aleksatr. I see that 4.2.0 is released and the adapter in question is merged. Dev-docs PR prebid/prebid.github.io#2141 was merged as well. However, I can not find it on the Download page. I was unable to find the information regarding how this list is updated

@aleksatr
Copy link
Contributor

hey @romanych , your docs PR is not properly formatted, that's why your adapter was not picked up by the renderer (jerkyll). You're missing "front matter" - https://jekyllrb.com/docs/front-matter/. Check how .md files of other adapters are formatted and submit another docs PR to fix it.

You can open a discussion on the original docs PR as well, to confirm this.
@MartianTribe prebid/prebid.github.io#2141

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.

6 participants