-
Notifications
You must be signed in to change notification settings - Fork 229
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.yml
configuration file default was changed toad_manager_api.yml
. - The
DfpApi
module was renamed toAdManagerApi
. - The
DfpDate
class was renamed toAdManagerDate
. - The
DfpDateTime
class was renamed toAdManagerDateTime
.
Note: The Ruby gem name is not changing and will continue to be google-dfp-api.
-
Rename your
dfp_api.yml
file 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
DfpApi
toAdManagerApi
.- 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
DfpDate
andDfpDateTime
classes, 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 toAdManagerDate
andAdManagerDateTime
, 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.