Actual Campaign Status

1,249 views
Skip to first unread message

cv

unread,
Apr 10, 2019, 8:41:46 AM4/10/19
to AdWords API and Google Ads API Forum
Hi,

How I can get Actual Campaign Status when I run the query.

For example I need campaign status in words like ENABLE instead digits like 1, 2

Thanks,

 
Message has been deleted

cv

unread,
Apr 10, 2019, 8:54:05 AM4/10/19
to AdWords API and Google Ads API Forum
Hi,

My Reply is automatically get deleted when I try to post query.

Any Idea how I can put the code?

Thanks,

googleadsapi...@google.com

unread,
Apr 10, 2019, 3:07:30 PM4/10/19
to AdWords API and Google Ads API Forum
Hello Chirag,

I am able to see the code snippets you have shared. Since the campaign.status represents the ENUM value of the status. You have to get the field name type CampaignStatus. Please give it a try and let me know if you have any further questions.

Regards,
Sai Teja, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

cv

unread,
Apr 11, 2019, 2:25:35 AM4/11/19
to AdWords API and Google Ads API Forum
Can you please give me example how I can use?

I am not finding any.

Thanks,

googleadsapi...@google.com

unread,
Apr 11, 2019, 12:21:22 PM4/11/19
to AdWords API and Google Ads API Forum
Hello Chirag,

You can try something like $Campaign_Status = CampaignStatus::getByValue(2); to get the campaign enum by the value. Please give it a try and let me know if you have any further questions.


Regards,
Sai Teja, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/e59ac3d2-bf9f-40b5-89ff-db7d9491c6e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

cv

unread,
Apr 12, 2019, 1:45:08 AM4/12/19
to AdWords API and Google Ads API Forum
Hello Sai,

No it is not possible using PHP client Library.

I was using this reflection property only, but not possible.


 
Thanks,

googleadsapi...@google.com

unread,
Apr 15, 2019, 12:02:33 PM4/15/19
to AdWords API and Google Ads API Forum
Hello Chirag,

You have to use the CampaignStatusEnum and get the enum by the value you get with the CampaignStatus field in the query. I found a GitHub page that shown all the possible ways to fetch Enums, please take a look and give it a try again.


Regards,
Sai Teja, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Message has been deleted

cv

unread,
Apr 16, 2019, 3:13:30 AM4/16/19
to AdWords API and Google Ads API Forum
Hello Sai,

Thanks for pointing out the gitHub page.

But that is not a feasible solution.

Because 
1) I need to add extra github page "marc-mabe/php-enum": "^3.1"

2) I need to have my own class or I need to extend current CampaignStatus, I am doing any wrong here please let me know.

 class CampaignStatus extends Enum


3) I can get Name by this

$status = CampaignStatus::byValue($googleAdsRow->getCampaign()->getStatus());  
var_dump
($status->getName()); //Returns string(7) "ENABLED"



So I think It is not a solution.

I think issue lies with PHP library as said over here

Thanks.

googleadsapi...@google.com

unread,
Apr 16, 2019, 10:03:58 AM4/16/19
to AdWords API and Google Ads API Forum
Hello Chirag,

The process you are using to pull the enum name 'ENABLED' looks good. If you are still facing the issues, please share the details on the github issue mentioned. Our client library owners are better equipped to answer client library related questions.


Regards,
Sai Teja, Google Ads API Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

cv

unread,
Apr 17, 2019, 1:31:42 AM4/17/19
to AdWords API and Google Ads API Forum
Okay,

But tis should required to update all the files under Google\Ads\GoogleAds\V1\Enums\, so no use of Library.

Yes, I am already following that thread, lets hope in future release this should be fixed.

Thanks
Reply all
Reply to author
Forward
0 new messages