Pausing Ad Groups in an Array

閲覧: 22 回
最初の未読メッセージにスキップ

sz...@mymail.mines.edu

未読、
2018/07/10 16:04:122018/07/10
To: AdWords API and Google Ads API Forum
Hello,

If I have a list of adgroups in an array, or at least their ID or something similar, can I pause them without having to use a selector? Essentially I am filtering the adgroups to see which need to be paused using my own algorithm, as the predicates are not specific enough. Thus I put all the ads i want to pause into an array. How would I got about pausing these?

Thanks,

Sean

Luis Xander Talag (AdWords API Team)

未読、
2018/07/11 0:23:162018/07/11
To: AdWords API and Google Ads API Forum
Hi Sean,

You don't need a selector if your goal is just to pause the ad group. All you need to do is to create a loop for your array and set directly each ad group id and ad group status to PAUSE. You may refer to below code snippet for simple SET operation of the ad group.

   <soapenv:Body>
        <mutate xmlns="https://adwords.google.com/api/adwords/cm/v201806">
            <operations>
                <operator>SET</operator>
                <operand>
                    <id>1234567890</id>
                    <status>PAUSED</status>
                </operand>
            </operations>
        </mutate>
    </soapenv:Body>

Thanks and regards,
Luis
AdWords API Team

sz...@mymail.mines.edu

未読、
2018/07/11 16:16:502018/07/11
To: AdWords API and Google Ads API Forum
Awesome, Thank you! Not sure how to use the operand to set the id, as I've never had to do that before. If you could give me some pesudocode or php code to show me how to do that, that would be great!

Luis Xander Talag (AdWords API Team)

未読、
2018/07/11 23:46:212018/07/11
To: AdWords API and Google Ads API Forum
Hi Sean,

You may refer to this sample code in PHP on how to set the ad group id to your operand.

Regards,
Luis
AdWords API Team
全員に返信
投稿者に返信
転送
新着メール 0 件