获取无限创意、计算高转化概率定向,手动上不太适合精细化运营。前文提到,高于平均转化率的定向组合就有三百多种,批量上传自动投放测试才能解放双手。

信息流投放门槛越来越低,入门的工作内容也趋于机械化 感觉自己就是个建计划的机器,批量投放是未来的趋势。信息流广告批量投放本不是难事,有第三方平台、也可以自己写,重点还是在投放规则也就是运营方法。

信息流广告批量投放工具要点有三,其一,定向设置;其二,创意上传;其三,测试规则。

信息流广告批量投放定向设置

def adgroups_add(advertiser_set) :

    '''
    adgroup_name:广告组名称
    promoted_object_type:推广目标类型 PROMOTED_OBJECT_TYPE_LINK网页,PROMOTED_OBJECT_TYPE_LINK_WECHAT网页(微信推广)
    end_date:空字符为长期投放
    billing_event:计费类型 BILLINGEVENT_CLICK按点击扣费,BILLINGEVENT_APP_DOWNLOAD按照应用下载扣费,BILLINGEVENT_IMPRESSION按曝光扣费
    bid_amount:出价
    optimization_goal:广告优化目标类型 OPTIMIZATIONGOAL_ECOMMERCE_ORDER 下单
    time_series:0 为不投放,1 为投放,全传 1 视为全时段投放,不允许全部传 0
    configured_status:AD_STATUS_NORMAL有效, AD_STATUS_SUSPEND暂停
    targeting_id:定向包id
    site_set:投放站点集合(广告版位) SITE_SET_MOBILE_UNION优量汇,
    '''

    interface = 'adgroups/add'
    url = apiurl + interface

    common_parameters = {
            'access_token': advertiser_set['access_token'], 
            'timestamp': int(time.time()), 
            'nonce': str(time.time()) + str(random.randint(0, 999999)),
        }

    parameters = {
            "account_id": advertiser_set['account_id'],
            "campaign_id": advertiser_set['campaign_id'],
            "adgroup_name": advertiser_set['adgroup_name']+'-'+str(time.strftime("%m%d", time.localtime()))+'-'+str(int(time.time())),
            "promoted_object_type": "PROMOTED_OBJECT_TYPE_LINK",
            "begin_date": str((datetime.datetime.now()+datetime.timedelta(days=1)).strftime("%Y-%m-%d")),
            "end_date": "",
            "billing_event":"BILLINGEVENT_IMPRESSION",
            "bid_amount": 12000,
            "bid_strategy":"BID_STRATEGY_TARGET_COST",
            "optimization_goal": "OPTIMIZATIONGOAL_ECOMMERCE_ORDER",
            "time_series": "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",
            "site_set": advertiser_set['site_set'],
            "daily_budget": 0,
            "targeting_id": advertiser_set['targeting_id'],
            "configured_status": "AD_STATUS_NORMAL",
        }

    for k in parameters:
        if type(parameters[k]) is not str:
            parameters[k] = json.dumps(parameters[k])

    r = requests.post(url, params = common_parameters, data = parameters)
    return r.json()

信息流广告批量投放创意上传

def dynamic_creatives_add(advertiser_set) :
    '''
    添加动态创意
    
    '''

    interface = 'dynamic_creatives/add'
    url = apiurl  + interface

    common_parameters = {
            'access_token': advertiser_set['access_token'], 
            'timestamp': int(time.time()), 
            'nonce': str(time.time()) + str(random.randint(0, 999999)),
        }

    parameters = {
            "account_id": advertiser_set['account_id'],
            "dynamic_creative_name": '动态创意-'+str(time.strftime("%Y%m%d", time.localtime()))+'-'+str(int(time.time())),
            "dynamic_creative_template_id": advertiser_set['adcreative_elements'][0],
            "dynamic_creative_elements":advertiser_set['adcreative_elements'][1],
            "campaign_type": "CAMPAIGN_TYPE_NORMAL",
            "promoted_object_type": "PROMOTED_OBJECT_TYPE_LINK",
            "page_type": "PAGE_TYPE_DEFAULT",
            "site_set":advertiser_set['site_set'],
            "page_spec": 
            {
                "page_url": advertiser_set['page_url']
            },
        }

    for k in parameters:
        if type(parameters[k]) is not str:
            parameters[k] = json.dumps(parameters[k])

    r = requests.post(url, params = common_parameters, data = parameters)

    return r.json()
def adcreatives_add(advertiser_set) :
    '''
    adcreative_template_id:创意规则id 
    '''

    interface = 'adcreatives/add'
    url = apiurl + interface

    common_parameters = {
            'access_token': advertiser_set['access_token'], 
            'timestamp': int(time.time()), 
            'nonce': str(time.time()) + str(random.randint(0, 999999)),
        }

    parameters = {
            "account_id": advertiser_set['account_id'],
            "campaign_id": advertiser_set['campaign_id'],
            "adcreative_name": "广告创意",
            "adcreative_template_id": advertiser_set['adcreative_elements'][0],
            "adcreative_elements": advertiser_set['adcreative_elements'][1],
            "site_set":advertiser_set['site_set'],
            "promoted_object_type": "PROMOTED_OBJECT_TYPE_LINK",
            "page_type": "PAGE_TYPE_DEFAULT",
            "page_spec": 
            {
                "page_url": advertiser_set['page_url']
            },
        }

    for k in parameters:
        if type(parameters[k]) is not str:
            parameters[k] = json.dumps(parameters[k])

    r = requests.post(url, params = common_parameters, data = parameters)
    return r.json()

def images_add(advertiser_set,path) :
    with open(path, 'rb') as fp:
            data = fp.read()
    file_md5= hashlib.md5(data).hexdigest()
    
    interface = 'images/add'
    url = apiurl + interface
    common_parameters = {
            'access_token': advertiser_set['access_token'],
            'timestamp': int(time.time()),
            'nonce': str(time.time()) + str(random.randint(0, 999999)),
        }

    parameters = {
            "account_id": advertiser_set['account_id'],
            "upload_type": "UPLOAD_TYPE_FILE",
            "signature": file_md5
        }

    files = {
            'file' : open(path, 'rb')
        }

    
    for k in parameters:
        if type(parameters[k]) is not str:
            parameters[k] = json.dumps(parameters[k])

    r = requests.post(url, params = common_parameters, files = files, data = parameters)

    image_id=r.json()['data']['image_id']
    return image_id
def videos_add(advertiser_set,path) :
    interface = 'videos/add'
    url = apiurl + interface

    common_parameters = {
            'access_token': advertiser_set['access_token'],
            'timestamp': int(time.time()),
            'nonce': str(time.time()) + str(random.randint(0, 999999)),
        }

    parameters = {
            "account_id": advertiser_set['account_id'],
            "signature": "19efcaeda3c30e1cf28170d86ecbf5e0",
        }

    files = {
            'video_file' : open('/videos/'+path, 'rb')
        }

    for k in parameters:
        if type(parameters[k]) is not str:
            parameters[k] = json.dumps(parameters[k])

    r = requests.post(url, params = common_parameters, files = files, data = parameters)
    video_id=r.json()['data']['video_id']
    print (video_id)
    return video_id

信息流广告批量投放测试规则

既然都用上批量上传广告了,广告数量激增,还得筛选出优质广告。什么样的广告符合优质的条件?这就是背后运营人的方法差异了,这也是自己做批量投放的好处,自定义测试规则更加灵活。

筛选优质创意主要是预算限制和关停,主要规则如下,读取账户实时数据,自动完成调整。

实际cpa>出价*3,关停

实际cpa>出价*2,预算调整为5*cpa

实际cpa>出价*1.5且转化>5,出价降低10%。

时间>=3天且消费<X,关停