Git Product home page Git Product logo

dcm-bulk-trafficking's Introduction

Disclaimer:These code samples being shared are not official Google products and are not formally supported.

DCM Bulk Trafficking Tool

An example tool to perform bulk tasks using DCM API.

OVERVIEW

This AppScript-based tool lets you use a Google Spreadsheet to perform bulk tasks including - Bulk Create Campaigns - Bulk Create Placements - Bulk Create Ads - Bulk Create Creatives - Bulk Create Landing Pages.

It uses DCM APIs to pull and push data to DCM.

The same result could be achieved by manually creating each entities through the DCM UI, but the tool leverages the APIs and Spreadsheet functionalities to automate the most of manual steps.

In order to use this tool you need to have valid access to the DoubleClick Campaign Manager APIs through your Google Account, and you will need to enable that API in a Google Cloud Project so that you can authenticate the tool (see the corresponding step of Initial Setup section below).

INITIAL SETUP

  • Create a new Google Spreadsheet and open its script editor (from Tools > Script Editor)
    • Copy the code from code.js and utils.js in two corresponding code.gs, utilities.gs files in your AppScript project
    • Enable DCM API Resources > Advanced Google Services and enable the DCM/DFA Reporting and Trafficking API (v3.1)
    • Click on Google API Console link at the bottom of Advanced Google Services window to open the Google Cloud Platform project, select Library from the left hand menu, then search and enable the DCM API in the project
  • Close the script editor and spreadsheet tabs both (this is necessary so the custom functions appear)
  • Re-open the Go back to the Spreadsheet, click on the DCM Functions menu and select Setup Sheets for the initial tabs and header rows setup (wait for the script to finish)
  • Remove any tab not needed (aside from the ones created by script)
  • Input the DCM Profile ID in the setup tab (i.e. at cell C5) then select Data from the sheet menu and select Named Ranges.... to set the title DCMUserProfileID and value Setup!C5

USAGE

  • As general rules
    • Only manually edit columns with green headers.
    • Columns with blue headers will be auto-populated.
    • Columns with a header* means it's required, otherwise optional
  • List Sites get all the sites this profile has added and populate them in Sites tab (this tab is for read-only purpose, so do not edit it).
  • Bulk Create Campaigns Fill out the tab Campaigns with campaign information, then select "Bulk Create Campaigns" from DCM Functions menu.
  • Bulk Create Placements Fill out the tab Placements then select "Bulk Create Placements" from DCM Functions menu.
  • Bulk Create Ads Fill out the tab Ads then select "Bulk Create Ads" from DCM Functions menu.
  • Get All Creatives Fill out the tab Creatives then select "Bulk Create Creatives" from DCM Functions menu.
  • Bulk Create Landing Pages Fill out the tab LandingPages then select "Bulk Create Landing Pages" from DCM Functions menu.

CELL FORMATTING

Some of the columns require exact format to be used. Below you can find a list of all requirements:

  • Date and date time columns should be formatted using date or date time formats (see Format>Number>Date or Date time in the top menu bar)
  • Placements tab
    • Compatibility column - acceptable values are:
      • APP
      • APP_INTERSTITIAL
      • DISPLAY
      • DISPLAY_INTERSTITIAL
      • IN_STREAM_AUDIO
      • IN_STREAM_VIDEO
    • Pricing Schedule Pricing Type column - acceptable values are:
      • PRICING_TYPE_CPA
      • PRICING_TYPE_CPC
      • PRICING_TYPE_CPM
      • PRICING_TYPE_CPM_ACTIVEVIEW
      • PRICING_TYPE_FLAT_RATE_CLICKS
      • PRICING_TYPE_FLAT_RATE_IMPRESSIONS
    • Tag Formats column - acceptable values are:
      • PLACEMENT_TAG_STANDARD
      • PLACEMENT_TAG_IFRAME_JAVASCRIPT
      • PLACEMENT_TAG_IFRAME_ILAYER
      • PLACEMENT_TAG_INTERNAL_REDIRECT
      • PLACEMENT_TAG_JAVASCRIPT
      • PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT
      • PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT
      • PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT
      • PLACEMENT_TAG_CLICK_COMMANDS
      • PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH
      • PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3
      • PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4
      • PLACEMENT_TAG_TRACKING
      • PLACEMENT_TAG_TRACKING_IFRAME
      • PLACEMENT_TAG_TRACKING_JAVASCRIPT
  • Ads tab
    • Impression Ratio column - acceptable values are 1 to 10, inclusive
    • Priority column - acceptable values are 1 to 16, inclusive
    • Type column - acceptable values are:
      • AD_SERVING_CLICK_TRACKER
      • AD_SERVING_DEFAULT_AD
      • AD_SERVING_STANDARD_AD
      • AD_SERVING_TRACKING
  • Creatives tab
    • Creative Type column - acceptable values are:
      • BRAND_SAFE_DEFAULT_INSTREAM_VIDEO
      • CUSTOM_DISPLAY
      • CUSTOM_DISPLAY_INTERSTITIAL
      • DISPLAY
      • DISPLAY_IMAGE_GALLERY
      • DISPLAY_REDIRECT
      • FLASH_INPAGE
      • HTML5_BANNER
      • IMAGE
      • INSTREAM_AUDIO
      • INSTREAM_VIDEO
      • INSTREAM_VIDEO_REDIRECT
      • INTERNAL_REDIRECT
      • INTERSTITIAL_INTERNAL_REDIRECT
      • RICH_MEDIA_DISPLAY_BANNER
      • RICH_MEDIA_DISPLAY_EXPANDING
      • RICH_MEDIA_DISPLAY_INTERSTITIAL
      • RICH_MEDIA_DISPLAY_MULTI_FLOATING_INTERSTITIAL
      • RICH_MEDIA_IM_EXPAND
      • RICH_MEDIA_INPAGE_FLOATING
      • RICH_MEDIA_MOBILE_IN_APP
      • RICH_MEDIA_PEEL_DOWN
      • TRACKING_TEXT
      • VPAID_LINEAR_VIDEO
      • VPAID_NON_LINEAR_VIDEO
    • Creative Asset Type column - acceptable values are:
      • AUDIO
      • FLASH
      • HTML
      • HTML_IMAGE
      • IMAGE
      • VIDEO

dcm-bulk-trafficking's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dcm-bulk-trafficking's Issues

Unable to Assign Same Ad to Multiple Placements

I have tried using comma, pip, and underscore separated placement IDs in the placement ID column and no matter what I get the error "GoogleJsonResponseException: API call to dfareporting.ads.insert failed with error: Invalid value for Long: 268025413,268031113,268031116"

Is there a way to do this? I can assign multiple ads 1:1 with placements but this creates a lot of waste in DCM

Creative Tab does not Function

No matter how I format this tab I get an error. The closest I can get is GoogleJsonResponseException: API call to dfareporting.creatives.insert failed with error: 9040 : You cannot save your creative because it is not SSL-compliant. Check for non-secure URLs (http) that may affect SSL compliance.

Where is this tab pulling creatives from? Is it looking for creative name in DCM? Is it pulling from drive? If so where do the files need to be saved. I do not get any sort of pop up asking where the creative is. Any input would be appreciated.

DCM Functions dont work

Every DCM function I have tried to use gives the same error:
TypeError: Cannot call method "getValue" of null.

Any idea what is wrong? My set up appears to be correct otherwise.

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.