-
Notifications
You must be signed in to change notification settings - Fork 224
DFP to Ad Manager rebrand guide
DoubleClick for Publishers was recently renamed to Google Ad Manager. To be consistent with these changes, we’ve updated our example code and refactored type names throughout this library. You’ll only need to make a few small changes to upgrade your existing code.
- The
dfp_api.ymlconfiguration file default was changed toad_manager_api.yml. - The
DfpApimodule was renamed toAdManagerApi. - The
DfpDateclass was renamed toAdManagerDate. - The
DfpDateTimeclass was renamed toAdManagerDateTime.
Note: The Ruby gem name is not changing and will continue to be google-dfp-api.
-
Rename your
dfp_api.ymlfile toad_manager_api.yml. The internal structure of the file should remain unchanged. Alternatively, you can change the default configuration filename by passing in the full path to your configuration file when you initialize the Api object like this:AdManagerApi::Api.new('/path/to/home/dfp_api.yml').- Failure to make this change will cause an error like:
No such file or directory: /path/to/home/ad_manager_api.yml
- Failure to make this change will cause an error like:
-
Change require statements from
require 'dfp_api'torequire 'ad_manager_api'.- Failure to make this change will cause an error like:
cannot load such file -- dfp_api (LoadError)
- Failure to make this change will cause an error like:
-
Change module references from
DfpApitoAdManagerApi.- Failure to make this change will cause an error like:
uninitialized constant DfpApi (NameError)
- Failure to make this change will cause an error like:
-
For the
DfpDateandDfpDateTimeclasses, if you’re using the top-level module’s functions to create them (e.g.,ad_manager.date()), then no changes are needed for this step. However, if you’re referencing these classes directly in your code, you will need to update them toAdManagerDateandAdManagerDateTime, respectively.- Failure to make this change will cause an error like:
uninitialized constant AdManagerApi::DfpDate (NameError)
- Failure to make this change will cause an error like:
For questions about this or any other API changes, reach out to us on the Ad Manager API forums.