Code Monkey home page Code Monkey logo

example-dfp-line-item-generator's People

Contributors

juancaicedo avatar nanek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

example-dfp-line-item-generator's Issues

`argv.offset` undefined

Hi all,
I was able to set up my order correctly, but when I tried setting up my line items I couldn't get any value for argv.offset. If you notice, this is the undefined part of the order name. Also, how are you able to associate the line items with the order? I'm working off the granular-prebid branch

screen shot 2016-02-13 at 11 07 47 pm

CreateOrder not able to send externalOrderId

My createOrders call works flawlessly whenever I pass my object without the externalOrderId, like:

var args = { orders: [{
    name: 'My Order Name',
    advertiserId: 86999999,
    traffickerId: dfpTraffickerID
}]};

However, I get a soap error when I pass the externalOrderId, like:

var args = { orders: [{
    name: 'My Order Name',
    advertiserId: 86999999,
    traffickerId: dfpTraffickerID,
    externalOrderId: '#100043'
}]};

The error is below and I sure would appreciate any help you could give. I've tried using v201505, v201511 and v201602.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Client</faultcode>
      <faultstring>Unmarshalling Error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'externalOrderId'. One of '{"https://www.google.com/apis/ads/publisher/v201602":secondaryTraffickerIds, "https://www.google.com/apis/ads/publisher/v201602":salespersonId, "https://www.google.com/apis/ads/publisher/v201602":secondarySalespersonIds, "https://www.google.com/apis/ads/publisher/v201602":totalImpressionsDelivered, "https://www.google.com/apis/ads/publisher/v201602":totalClicksDelivered, "https://www.google.com/apis/ads/publisher/v201602":totalViewableImpressionsDelivered, "https://www.google.com/apis/ads/publisher/v201602":totalBudget, "https://www.google.com/apis/ads/publisher/v201602":appliedLabels, "https://www.google.com/apis/ads/publisher/v201602":effectiveAppliedLabels, "https://www.google.com/apis/ads/publisher/v201602":lastModifiedByApp, "https://www.google.com/apis/ads/publisher/v201602":isProgrammatic, "https://www.google.com/apis/ads/publisher/v201602":programmaticSettings, "https://www.google.com/apis/ads/publisher/v201602":appliedTeamIds, "https://www.google.com/apis/ads/publisher/v201602":lastModifiedDateTime, "https://www.google.com/apis/ads/publisher/v201602":customFieldValues}' is expected. </faultstring>    
    </soap:Fault>
  </soap:Body>
</soap:Envelope>

Also, what would be the best way to log the soap requests as they're sent? I'd like to get a look at them going out to figure out what's going wrong...

Thanks a ton man,
Ferg

Use prebid as default?

@nanek @mmilleruva @CarsonBanov

Based on the discussion in #1 and #29, and previous discussions we've had, does it make more sense for prebid to be the default branch? If you think most publishers are looking to generate line items for prebid, as opposed to for individual header bidders, we could do this. The prebid branch is also simpler (and the code is better thanks to @nanek).

WSDL Error: undefined: undefined

I've gotten this fairly cryptic error when running scripts that hit the DFP API ~400+ times

creating line items failed Error: undefined: undefined
    at WSDL.xmlToObject (/Users/admin/line-item-generator/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js:1400:19)

After some digging, I uncovered this error message and figured out that it's because the generator makes multiple requests for custom criteria values when preparing line items (each of which is done individually and happens quickly).

I found a good solution to be to rely on the caching mechanism more. The function first looks up the value in the local store. If it doesn't find it, then it queries DFP for all the values that match the keyid passed in. It then stores all of those in the local store and looks up the initial value again.

createLineItems error

When I call createLineItems with the object below, I get a soap error. I tried using the code directly from the createCampaign example, but ran into errors straight away with attributes of LineItem that don't exist. I went through the wsdl docs and changed up the LineItem, but still... Any help you could give sure would be appreciated...

[
  {
      "orderId": 428533037,
      "name": "Tester",
      "externalId": 55,
      "startDateTime": {
        "date": {
          "year": 2016,
          "month": 3,
          "day": 16
        },
        "hour": 19,
        "minute": 0,
        "second": 0,
        "timeZoneID": "America/Chicago"
      },
      "endDateTime": {
        "date": {
          "year": 2016,
          "month": 3,
          "day": 30
        },
        "hour": 19,
        "minute": 0,
        "second": 0,
        "timeZoneID": "America/Chicago"
      },
      "creativeRotationType": "WEIGHT",
      "lineItemType": "STANDARD",
      "allowOverbook": true,
      "skipInventoryCheck": true,
      "primaryGoal": {
        "goalType": "LIFETIME",
        "unitType": "IMPRESSIONS",
        "units": 122
      },
      "targeting": {
        "inventoryTargeting": {
          "targetedPlacementIds": 3441557
        }
      },
      "costType": "CPM",
      "creativePlaceholders": [
        {
          "size": {
            "width": 728,
            "height": 90,
            "isAspectRatio": false
          }
        }
      ],
      "costPerUnit": {
        "currencyCode": "USD",
        "microAmount": 2000000
      }
    }
]

ERROR:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Client</faultcode>
      <faultstring>Unmarshalling Error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'costType'. One of '{"https://www.google.com/apis/ads/publisher/v201602":creativeTargetings}' is expected. </faultstring>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>

Better report error messages

Errors from the API are not properly thrown back to the application code. They come in as strings in the body of the response like <soap-fault>Error!</soap-fault>.

Maybe the best way of handling this would be for lib/user when it executes a function from a service, to check the resulting string for an error and if it finds one, to construct a javascript error and throw it.

Error: soap:Server: [PublisherQueryLanguageSyntaxError.UNPARSABLE @ Unable to parse query: 'Where '

Copied from nanek/node-google-dfp-wrapper#24 by @brianibok

Hi All,

Getting the error below when I try to run the script to generate the line-items:

node scripts/create-line-items.js --order ORDER_NAME --start 1 --end 1

Error:
Progress [=-] 50% 0.0screating line items failed
because Error: soap:Server: [PublisherQueryLanguageSyntaxError.UNPARSABLE @ Unable to parse query: 'Where '
Syntax error at line 0, column 0.]

However no modifications were made to the script

Error: getTokens Error

Hi All,

Trying to create an order using the script and everything works fine up until I run the create order command and get the error below:

getTokens Error invalid_grant
.../example-dfp-line-item-generator/node_modules/node-google-dfp/lib/DfpUser.js:69
throw error;
^

Any ideas?

Set up problems

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

Got error when run npm install

When I try to use this code, use npm install to install dependency npm package, it always report this error.
Can you help to point out where I am wrong?

Tested under NodeJS 4.2.4

lz 2016-01-04 at 5 20 54 pm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.