Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Clone the git repo
  2. Build and run a docker container:
    • Install Docker (if not already installed). 
    • Build the docker: docker build -t openwrap-dfp .
    • Run the container: docker run -tid openwrap-dfp (returns a container id that you will use in the next step)
    • Execute an interactive bash shell on the container where you can run the tool: docker exec -t -i <container_id> /bin/sh
  3. Set googleads.yaml
    • Make a copy of googleads.example.yaml, then rename it, googleads.yaml
    • In googleads.yaml, set these required fields:
      • application_name — the Google project you named while creating GAM credentials above. It should appear in the top-left of the credentials page.
      • network_code — your GAM network number; for example, in the url: https://admanager.google.com/12398712#delivery, the network code is 12398712.
      • path_to_private_key_file — the path to the JSON file downloaded while creating google credentials.
      • Here is the sample content for googleads.yaml:

        Code Block
        languageyml
        titleSample googleads.yaml
        # From: https://github.com/googleads/googleads-python-lib/blob/master/googleads.yaml
        ad_manager:
          #############################################################################
          # Required Fields                                                           #
          #############################################################################
          application_name: lineitem-tool
          network_code: 12398712
          path_to_private_key_file: ./key.json


  4. Verify your set upsetup
    To test your set up, from the top-level directory, run:
    python -m dfp.get_orders
    If successful, it returns all the orders in your GAM account.
  5. Create line items for OpenWrap
    • Edit the settings.py for the line items, you want to create.
    • Read the instructions in the README for config values.
    • For the price buckets file, use the same file template used by the existing line item tool: LineItem.csv
    Note
    titleImportant…
    Ignore the Order Name and Advertiser columns are in the CSV file. Specify those settings in, settings.py
    • Execute the tool:
      python -m tasks.add_new_openwrap_partner

...

For example, to update the rate of a line item, you can add the following two files:

...