The script automatically updates the status of advertising campaigns to “Paused” if they're not assigned to ad groups, to optimize budget management
What can I do with this?
This script helps to optimize budget algorithms by only having campaigns that are aligned to ad groups set to active across all your publishers.
Example
How it works
The script reviews any campaigns, identifies any that are not in an active ad group, and updates the status to Paused.
Requirements
Report
- Account
- Campaign
- Status
Script
RPT_COL_CAMPAIGN = 'Campaign'
RPT_COL_ACTIVE_GROUPS = 'Active Groups'
RPT_COL_ACCOUNT = 'Account'
RPT_COL_AMAZON_BIDADJPRODUCTPAGE = 'Amazon Bid Adj. Product Page'
BULK_COL_ACCOUNT = 'Account'
BULK_COL_CAMPAIGN = 'Campaign'
BULK_COL_STATUS = 'Status'
outputDf[BULK_COL_STATUS] = numpy.nan
# pause campaign if no active adgroups
outputDf.loc[ inputDf[RPT_COL_ACTIVE_GROUPS] == 0, BULK_COL_STATUS] = 'Paused'
# only include rows with non-empty Status
outputDf = outputDf[ outputDf[BULK_COL_STATUS].notnull() ]