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 eplanning adapter #1245

Merged
merged 2 commits into from
Jun 14, 2017
Merged

Add eplanning adapter #1245

merged 2 commits into from
Jun 14, 2017

Conversation

sebaperez
Copy link
Contributor

Type of change

  • Bugfix
  • Feature
  • New bidder adapter
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other

Description of change

  • test parameters for validating bids
{
  bidder: 'eplanning',
  params: {
    ci: '18f66',
    t: '1'
  }
}

Other information

@dbemiller dbemiller self-assigned this May 30, 2017
@dbemiller
Copy link
Contributor

LGTM

@sebaperez Just so you know, we're also looking to prevent JSONP in Prebid 1.0 (probably to be worked on starting in the second half of this year). This is fine for the 0.x releases though.

@dbemiller dbemiller added the LGTM label May 30, 2017
@protonate protonate added this to the Prebid 0.25.0 milestone Jun 2, 2017
Copy link
Collaborator

@protonate protonate left a comment

Choose a reason for hiding this comment

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

In test mode (with global param t === '1') neither the processEPlanningResponse or callback functions get called and no bid is added to pbjs._bidsReceived. Please have a look to see if test mode can be made to work similarly to the typical system flow.

@sebaperez
Copy link
Contributor Author

@protonate I just tested it and works fine for me. Did you test it locally? Do you have the HTML file where it doesn't work?

@dbemiller
Copy link
Contributor

An adapter test page got added in #1182 you can use.

@protonate
Copy link
Collaborator

This is the code that is returned by the bid request:

!function() {
    var c, e, a = window, b = a.adUnits, d = {
        sI: {
            k: "1f4b4"
        },
        sec: {
            k: "ROS"
        },
        sp: []
    };
    if (b && b.length)
        for (c = 0; c < b.length; c++)
            if (b[c].bids && b[c].bids.length)
                for (e = 0; e < b[c].bids.length; e++)
                    "eplanning" === b[c].bids[e].bidder && d.sp.push({
                        k: b[c].code,
                        a: [{
                            w: "object" == typeof b[c].sizes[0] ? b[c].sizes[0][0] : b[c].sizes[0],
                            h: "object" == typeof b[c].sizes[0] ? b[c].sizes[0][1] : b[c].sizes[1],
                            adm: "<p>test ad for " + b[c].code + "</p>",
                            pr: 1
                        }]
                    });
    hbpb.rH(d)
}();

The a variable is set to window and then b is set to an a.adUnits property. There isn't a window.adUnits property however. Are you getting this same code block? If so, how is window.adUnits getting set?

@sebaperez
Copy link
Contributor Author

@protonate that's the response in test case (when t === '1') - If you do not set that variable, then the response is different. In both cases, it is handled by hbpb.rH().
I think the problem you were experiencing was because you tested it locally (file://) and the call to the adserver is made with a relative URL (//...). I just pushed some changes that forces http or https protocol, and never use "file" protocol.

@protonate
Copy link
Collaborator

The test case then doesn't return a bid "response". What is the expectation here?

The t param is set as String(1) in the PR description above. However this should be Number(0) to turn off test, as String(0) evaluates to true. It would be clearer if this was set as Number(1) for the test case.

I am testing from localhost and from a "prebidapp.com" domain with a hosts file entry to 127.0.0.1, and on port 9999 in both cases.

With t set to Number(0) the bidder makes this call:

http://ads.us.e-planning.net/hb/1/18f66/1/localhost/ROS?rnd=0.7947294411451566&e=/19968336/header-bid-tag-1:728x90,970x90+/19968336/header-bid-tag-0:300x250,300x600&ur=http%3A//localhost%3A9999/gpt.html&cb=hbpb.rH&r=pbjs

And the response is:

hbpb.rH();

So I'm not able to confirm a bid back in either test or non-test case. Any thoughts?

@dbemiller
Copy link
Contributor

dbemiller commented Jun 14, 2017

We chatted about it. Not sure what's happening on his system... but everything looks good to me. Screenshots below to prove it (using the hello_world.html file from #1182, substituting the params @sebaperez gave here).

screen shot 2017-06-14 at 3 08 02 pm

screen shot 2017-06-14 at 3 09 02 pm

@protonate said he's good with merging this for 0.25.0... so I'm going for it.

@dbemiller dbemiller merged commit c47b01d into prebid:master Jun 14, 2017
Yann-Pravo pushed a commit to Yann-Pravo/Prebid.js that referenced this pull request Jul 6, 2017
* Added eplanning adapter

* Added protocol by default
vzhukovsky added a commit to aol/Prebid.js that referenced this pull request Sep 6, 2017
….24.0 to aolgithub-master

* commit '7a81386579a3c129617323ef32e1c8be0897c3c7': (31 commits)
  Added changelog entry.
  Added records in aolPartnersIds.json.
  Prebid 0.25.0 Release
  Added Unruly adapter (prebid#1264)
  Fixing Adyoulike adapter for Safari iOS7 (prebid#1296)
  hide overflow to prevent scrolling (prebid#1294)
  fix protocol detection in iframe (prebid#1293)
  Add eplanning adapter (prebid#1245)
  Use Renderer command queue to render outstream (prebid#1283)
  Generate no-bid response for ech bid request not matched by a bid (prebid#1216)
  New Cox adapter (prebid#1228)
  Carambola Adapter (prebid#1221)
  Pass through transactionId and set fd=1 (prebid#1259)
  Integration test page for adapters (prebid#1182)
  Getting DigiTrustID in GumGum adapter (prebid#1256)
  Trion adapter (prebid#1254)
  use request bidder code as default bidderCode for createBid (prebid#1235)
  Add drop pixels once feature to AOL Adapter (prebid#1224)
  Rubicon Adapter - Adding 320x150 (prebid#1279)
  Prevent 'about:' protocol in _publisherTagUrl (prebid#1170)
  ...
jbAdyoulike pushed a commit to jbAdyoulike/Prebid.js that referenced this pull request Sep 21, 2017
* Added eplanning adapter

* Added protocol by default
dluxemburg pushed a commit to Genius/Prebid.js that referenced this pull request Jul 17, 2018
* Added eplanning adapter

* Added protocol by default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants