nanek / example-dfp-line-item-generator

Example code to help you quickly and systematically create line items in Google's Doubleclick for Publishers
MIT License
37 stars 17 forks source link

Set up problems #1

Closed JuanCaicedo closed 8 years ago

JuanCaicedo commented 9 years ago

Please let us know here if you're having troubles getting started!

jononomo commented 9 years ago

README says the following:

Go to https://console.developers.google.com/project. Make a project for your app and then go to https://console.developers.google.com/project/your-app/apiui/credential. Click Download JSON. Save the file as local/application-creds.json.

but… I don't see a “Download JSON” link or button to click

drew-yieldbot commented 8 years ago

Hi there, I'm trying to figure out why argv.offset is undefined and how I can associate my order its respective line item screen shot 2016-02-13 at 10 36 29 pm

JuanCaicedo commented 8 years ago

Hey @drew-yieldbot, glad to help! Would you mind opening up another issue for this?

Also I'm guessing you're working off the granular-prebid branch?

aforwark commented 8 years ago

Hi,

I've been able to set up an order and create line items at this point, but I get caught up with the Key Value pair associations on the line item. I'm having a hard time figuring out how to get these in there. Below is the code that gives me an error in the dfp.js file. I'm assuming it's because it doesnt' know how to lookup these values. Can you shed some light on what steps I might take to resolve this issue?

In the scripts/create-line-items.js in the getCombinations() method. customCriteriaKVPairs: { "hb_pb": (cpm.toString()) },

The other issue I see is that you have set it up to have all of your creatives separated out by ad unit. We are trying to add all creative sizes to each line item in order to reduce the amount of orders and line items we create. For example, I can create 2,000 total line items to get bids from 0.01 to 20.00 and have all creatives available to run there. Has anyone done this modification to this library and have any advice? Thank you!

nanek commented 8 years ago

Are you using the prebid branch https://github.com/spanishdict/example-dfp-line-item-generator/tree/prebid ? This branch is setup to create 2000 line items as you mention.

What error do you see? It should work as is, except there is one change you may need to use the prebid branch. In node_module dependencies node-google-dfp-wrapper, i commented out .then(this.replaceAdUnitName) in Dfp.prototype.prepareLineItem as it is not needed and causes errors if left in.

aforwark commented 8 years ago

I can't believe I missed this branch. Looks like that's exactly what I'm looking for. I heavily modified the master branch and one of the things I changed was the same thing you mentioned. I also pass through a placement ID instead so I never have to update the line items with new ad units.

aforwark commented 8 years ago

Thanks for the advice @nanek, it's working fine but I did come across an issue when associating creatives. The script failed for me and I have 100 left on a order. How do you suggest handling the error below?

--partner PREBID Progress [=======---] 70% 250.9screating all associations failed because Error: soap:Server: [CommonError.CONCURRENT_MODIFICATION @ ] at WSDL.xmlToObject (/Users/andyforwark/Sites/line-item-generator/node_modules/soap/lib/wsdl.js:1426:19) at /Users/andyforwark/Sites/line-item-generator/node_modules/soap/lib/client.js:259:25 at Request._callback (/Users/andyforwark/Sites/line-item-generator/node_modules/soap/lib/http.js:109:5) at Request.self.callback (/Users/andyforwark/Sites/line-item-generator/node_modules/request/request.js:360:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request. (/Users/andyforwark/Sites/line-item-generator/node_modules/request/request.js:1202:14) at emitOne (events.js:101:20) at Request.emit (events.js:188:7) at IncomingMessage. (/Users/andyforwark/Sites/line-item-generator/node_modules/request/request.js:1150:12) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:973:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9)

nanek commented 8 years ago

I've encountered this issue as well. It's been awhile, however I believe I just ran it again after waiting for a period of time. I believe we are hitting a rate limit from google's API. I recall waiting between creating orders to avoid hitting this half way through.

nanek commented 8 years ago

Closing this general issue. Please open a new issue if needed. Thanks!