Re: Zero cost omitted from results

2022-07-05 Thread MATTHEW Dworkin
Hello,

Not sure if you're taking a tally, but if it helps the internal review: it 
would be *very* helpful to have the option to return rows with zero metric 
reporting. 

Anyone else need this? Let them know!

Thanks,
Matt

On Thursday, June 2, 2022 at 2:41:32 PM UTC-4 adsapi wrote:

> Hi Mat,
>
> Thank you for your feedback. I have created a feature request on your 
> behalf, subject to internal review. Any relevant updates will be posted in 
> the release notes 
> .
>
> I see that you have posted on multiple threads created by other users. If 
> you have any follow-up remarks or questions related to zero metric 
> reporting, please limit correspondence to this thread.
>
> Regards,
> Matt
> Google Ads API Team
>
> [image: Google Logo] 
> Matt 
> Google Ads API Team 
>
>
> ref:_00D1U1174p._5004Q2YsMjS:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/4ed2c93d-7415-4bf1-af30-0a49be4cbd7cn%40googlegroups.com.


Re: Google Ads Status values (And others) no longer display text value

2022-06-21 Thread MATTHEW Dworkin
Hey Mike,

I think I've run into this before, try using:

use Google\Ads\GoogleAds\V10\Enums\CampaignStatusEnum\CampaignStatus;

And then do CampaignStatus::name($campaign->getStatus());

That should map the number to the name.

Hope that helps.

-Matt

On Tuesday, June 21, 2022 at 4:41:16 PM UTC-4 
mjen...@qualitylogoproducts.com wrote:

> I noticed starting around April or so? That certain values no longer 
> display the text word variation for them...
> For instance:
> Campaign.status and Ad_Group.Status
> ENABLED = 2
> PAUSED = 3
> REMOVED = 4
>
> The items received from the query show as a numerical value...
>
> This is also for...
> segments.day_of_week
> campaign.serving_status
> segments.search_term_match_type
> search_term_view.status
>
> To name a few...
> Is this working as intended or?
> If it is, is there a key comparison we can use to match the values to what 
> they used to be?
>
> Any help would be greatly appreciated,
> Mike Jenkins
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/565fd5ca-660a-42b6-a753-0fbf15716b9en%40googlegroups.com.


How to get Image Urls/Text for Responsive Display Ads

2022-06-21 Thread MATTHEW Dworkin
Hello,

I'm trying to pull a report for Ads, and I'm having difficulty getting URLs 
and text for image and headline assets. I'm able to get the resource names 
for them, but have been unable to pull actual image urls and the actual 
headlines. 

I've tried a few of approaches and have been scouring the php library but 
can't seem to find what I need. 

1. $googleAdsRow->getAdGroupAd()->getAd()->getImageAd() - Returns null
1.a. getImageAd is supposed to return an ImageAdInfo object that has a 
getImageUrl method on it, but sincee ImageAdInfo is null, I cant' use it.
2. $googleAdsRow->getAdGroupAd()->getAd()->getResponsiveDisplayAd() returns 
iterator 
2.a Iterate over return from 2 and use getAsset(), returns resource name

I've faced similar issues w/ text ads.

So a few questions:
i. Is what I'm trying to do possible? (seems like it should be)
ii. What do I need to do?

Thanks for your help!

Best,
Matt

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/e4385bc3-d9ff-494f-9e5a-8b78a78d5633n%40googlegroups.com.


Batch Jobs started failing.

2022-05-06 Thread MATTHEW Dworkin
Hello, 


Our batch jobs started failing out of nowhere. It looks like our function 
to fetchAndReturnResults is ending before the batch job is complete. I've 
tried to increase the `MAX_TOTAL_POLL_INTERVAL_SECONDS` to 180, but still 
no luck. Is there more latency today? 

I've provided the constants and function below:

//Constants
const POLL_FREQUENCY_SECONDS = 1;
private const MAX_TOTAL_POLL_INTERVAL_SECONDS = 180;
private const PAGE_SIZE = 1000;



function fetchAndReturnResults(
BatchJobServiceClient $batchJobServiceClient,
string $batchJobResourceName
) {
$results = [];
// Gets all the results from running batch job and print their information.
try{

$batchJobResults = $batchJobServiceClient->listBatchJobResults(
$batchJobResourceName,
['pageSize' => self::PAGE_SIZE, "responseContentType"=>2]
);

foreach ($batchJobResults->iterateAllElements() as $batchJobResult) {
$results[] = $batchJobResult;
}

return $results;
}
catch(GoogleAdsException $googleAdsException){
foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) 
{
$results['error'][] = ['status'=>$error->getErrorCode()->getErrorCode(), 
'err'=> $error->getMessage()];
}
}
catch(Exception $e){
$results['error'][] = ['status'=>$e->getCode(), 'err'=>$e->getMessage()];
}

finally {
return $results;
}
}

Right now the exception is being hit and returning an error that I can't 
retrieve results until batch job is finished.

This has been working for two months, so strange it would suddenly break. 
Should I be doing something else here?

Thanks for your help.

Best,
Matt

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/5ad8f0fa-76cc-4ddd-9e6e-6b7681a47dc0n%40googlegroups.com.


Batch Job returns NULL

2022-04-06 Thread MATTHEW Dworkin
Hello,

I've been running into some issues with Batch operations and it's hard to 
tell what's going wrong. There are two ways I'm triggering a batch job, one 
way works, the other doesn't.

Way that works: A cron job pulls data from our database, constructs 
payloads, and sends it to our google ads service that starts the batch job. 
When doing this, everything updates, and results are sent back to the 
initial script and we log results in our database.

Way that doesn't work: We have a UI that allows us to make updates on 
campaigns or ad groups. When a user submits a number of edits, it  
constructs the same type of payload as in the other case, and sends it to 
our google ads service that starts the batch job. But then after about 10 
seconds, the front end gets a null response. When checking the Google ads 
UI, it looks as if the data updated appropriately. So the problem seems to 
be that a null response is sent back to the UI instead of an actual 
response with results.

I can't tell if polling finishes too early or what, but I can't pinpoint 
the issue. No errors are coming back either.

I'd be happy to send some code, but unsure of what code to send, if you 
need something let me know. 

Thanks for any help you can provide!

Best,
Matt

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/cc5f366f-06b6-43ea-b12c-a5851016d37fn%40googlegroups.com.