dfp rebrand

msaniscalchi edited this page Aug 21, 2018 · 1 revision

Overview

DoubleClick for Publishers was recently renamed to Google Ad Manager. To be consistent with these changes, we’ve updated example code and refactored type names throughout this library. You’ll only need to make a few small changes to upgrade your existing code.

What changed?

  • The dfp YAML configuration key was changed to ad_manager
  • The dfp module was renamed to ad_manager
  • The DfpClient class was renamed to AdManagerClient
  • The DfpClassType class was renamed to AdManagerClassType
  • The DfpReportError class was renamed to AdManagerReportError
  • The dfp API scope key was changed to ad_manager

How to migrate

  • Modify your googleads.yaml file and change the dfp key to ad_manager

  • Any imports of the dfp module like this:

    from googleads import dfp

    Will cause the error: ImportError: No module named dfp, and will need to be changed to:

    from googleads import ad_manager

  • Any references to DfpClient like this:

    client = DfpClient.LoadFromStorage()

    Will cause the error: NameError: name ‘DfpClient’ is not defined, and will need to be changed to:

    client = AdManagerClient.LoadFromStorage()

  • Any references to DfpClassType like this:

    class_type = DfpClassType(value)

    Will cause the error: NameError: name DfpClassType’ is not defined, and will need to be changed to:

    class_type = AdManagerClassType(value)

  • Any handling of DfpReportError like this:

    except DfpReportError, e:

    Will cause the error: NameError: name ‘DfpReportError’ is not defined, and will need to be changed to:

    except AdManagerReportError, e:

  • Any access to the dfp api scope like this:

    scope = oauth2.GetApiScope('dfp')

    Will cause the error: Invalid API name "dfp" provided. Acceptable values are: [‘adwords’, ‘ad_manager’], and will need to be changed to:

    scope = oauth2.GetApiScope('ad_manager')

That’s it! If you have any issues, please don’t hesitate to report them here on GitHub.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.