C# AwReport object parsing

2019-01-25 Thread programmierung
Hello team,

I have a question about the AwReport (AwXmlTextReader) object parser.
According to the StreamReportToPredefinedReportRowType -> 
"https://developers.google.com/adwords/api/docs/samples/csharp/reporting#stream-results-from-a-report-as-objects-of-a-predefined-report-row-type;
 
I´m executing the following query:

"SELECT
AdGroupId,
AdGroupName,
Query,
Clicks,
Cost,
Impressions,
Ctr,
Interactions,
InteractionRate,
AverageCpc,
AverageCpe,
Conversions,
CostPerConversion,
ConversionRate,
ConversionValue,
AllConversions,
CostPerAllConversion,
ValuePerAllConversion,
ViewThroughConversions,
KeywordId
FROM SEARCH_QUERY_PERFORMANCE_REPORT
WHERE CampaignId = {campaignID}
AND AdGroupStatus = 'ENABLED'
during YESTERDAY"

Everything seems good and the performance is okay.
Unfortunately, in step 2, I am using the AwReport to parse the rows to 
their specific type of object

  using (ReportResponse response = utilities.GetResponse())
{
using (GZipStream gzipStream = new 
GZipStream(response.Stream, CompressionMode.Decompress))
{
using (var report = new 
AwReport(new 
AwXmlTextReader(gzipStream), "SearchQuery Performance"))
{
while (report.MoveNext())
{
Rows.Add(report.Current);
}
}
}
}


If I would parse the rows on my own, it would take around a second or 2 to 
parse 3000 rows.
This method above would take 30 seconds to do the exact same. It seems that 
iterating through the rows is causing this problem.

Is there any way to reduce the operation time?

Thanks in advance.
 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"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+unsubscr...@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/2c66f3e2-35d0-4bfd-80e3-05b5d776df5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Negative Keywords Report

2019-01-08 Thread programmierung
Thank you for your reply.
Unfortunately the reporting api returns an exception with the given 
error: "includeZeroImpressions is not supported for this request"

Am Dienstag, 8. Januar 2019 17:00:36 UTC+1 schrieb Zweitze:
>
> From the top of my head, you can get negative keywords on group level by:
>
>- Request KEYWORDS_PERFORMANCE_REPORT;
>- Set IncludeZeroImpressions to true, because those negatives never 
>get impressions(!);
>- Add a predicate on field IsNegative, equalling value "true"
>
> Note that you can't get negative keywords through this way. So if you need 
> all negative keywords, on group level and on campaign level, you need two 
> reports.
>
>
> On Tuesday, January 8, 2019 at 2:32:43 PM UTC+1, program...@ggmgastro.com 
> wrote:
>>
>> Hello,
>>
>> I just wanted to know if there´s a Negative Keyword report.
>> Unfortunately, the result from 
>> "CAMPAIGN_NEGATIVE_KEYWORDS_PERFORMANCE_REPORT" and 
>> "KEYWORDS_PERFORMANCE_REPORT" are not correct.  For some reasons, I will 
>> just retreive 2018 rows but we do have more negative keywords in just one 
>> adgroup.
>>
>>
>> CampaignNegativeKeywordsPerformanceReport - C#
>>
>> ReportDefinition definition = new ReportDefinition
>> {
>> reportName = "campaign negative report",
>> reportType = 
>> ReportDefinitionReportType.CAMPAIGN_NEGATIVE_KEYWORDS_PERFORMANCE_REPORT,
>> downloadFormat = DownloadFormat.CSV,
>> dateRangeType = range,//ALL_TIME
>> selector = new Selector()
>> {
>> fields = new string[]
>> {
>> "AccountCurrencyCode",
>> "AccountDescriptiveName",
>> "AccountTimeZone",
>> "BaseCampaignId",
>> "CampaignId",
>> "CampaignName",
>> "CampaignStatus",
>> "Criteria",
>> "CustomerDescriptiveName",
>> "ExternalCustomerId",
>> "Id",
>> "IsNegative",
>> "KeywordMatchType"
>> },
>> //predicates = preds.ToArray() //I´ve 
>> excluded every predicate to get the most results out of it
>> }
>> };
>> ReportUtilities utilities = new 
>> ReportUtilities(GoogleAdwords_Manager.Helper.Settings.SelectedAccount.User, 
>> "v201809", definition);
>> using (ReportResponse response = utilities.GetResponse())
>> {
>> using (StreamReader reader = new 
>> StreamReader(response.Stream))
>> {
>> var lines= 
>> reader.ReadToEnd().Split(Environment.NewLine.ToCharArray()); //returns a 
>> few lines :(
>>
>> }
>> }
>>
>>
>>
>> Maybe there are some limitations?
>> For my current solution, I need to have all Negative Keywords from a 
>> campaign or an adgroup. 
>> Currently, I am using the getKeywords function which was shown in the 
>> tutorials, but the speed is really slow because it has to download each 
>> keywords page by page for an entire campaign.
>>
>> Thanks in advance
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"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+unsubscr...@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/ba8cdee3-8f88-4133-a368-7db3d3b297cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Negative Keywords Report

2019-01-08 Thread programmierung
Hello,

I just wanted to know if there´s a Negative Keyword report.
Unfortunately, the result from 
"CAMPAIGN_NEGATIVE_KEYWORDS_PERFORMANCE_REPORT" and 
"KEYWORDS_PERFORMANCE_REPORT" are not correct.  For some reasons, I will 
just retreive 2018 rows but we do have more negative keywords in just one 
adgroup.


CampaignNegativeKeywordsPerformanceReport - C#

ReportDefinition definition = new ReportDefinition
{
reportName = "campaign negative report",
reportType = 
ReportDefinitionReportType.CAMPAIGN_NEGATIVE_KEYWORDS_PERFORMANCE_REPORT,
downloadFormat = DownloadFormat.CSV,
dateRangeType = range,//ALL_TIME
selector = new Selector()
{
fields = new string[]
{
"AccountCurrencyCode",
"AccountDescriptiveName",
"AccountTimeZone",
"BaseCampaignId",
"CampaignId",
"CampaignName",
"CampaignStatus",
"Criteria",
"CustomerDescriptiveName",
"ExternalCustomerId",
"Id",
"IsNegative",
"KeywordMatchType"
},
//predicates = preds.ToArray() //I´ve 
excluded every predicate to get the most results out of it
}
};
ReportUtilities utilities = new 
ReportUtilities(GoogleAdwords_Manager.Helper.Settings.SelectedAccount.User, 
"v201809", definition);
using (ReportResponse response = utilities.GetResponse())
{
using (StreamReader reader = new 
StreamReader(response.Stream))
{
var lines= 
reader.ReadToEnd().Split(Environment.NewLine.ToCharArray()); //returns a 
few lines :(

}
}



Maybe there are some limitations?
For my current solution, I need to have all Negative Keywords from a 
campaign or an adgroup. 
Currently, I am using the getKeywords function which was shown in the 
tutorials, but the speed is really slow because it has to download each 
keywords page by page for an entire campaign.

Thanks in advance

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"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+unsubscr...@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/c8a36456-630c-4a6a-b459-1814b2db9190%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to add Keywords in Shopping Campaigns

2018-11-13 Thread programmierung
Hello,

I just wanted to know, how can I add/remove Keywords in a Campaign which´s 
advertisingChannelType is SHOPPING.
I´ve tested the BasicOperations from the example, but I will get an error 
which says "OPERATION_NOT_PERMITTED_FOR_CAMPAIGN_TYPE".

The Software is written in C#.
My company´s Goal is to have an internal list, which holds our own defined 
Searchterms for which we are willing to pay and accept throught Google Ads.
If the Searchterm is not matching with our own list, we will add the 
searchterm as an excluded Keyword. If the Searchterm is matching, we will 
remove the excluded Keyword, so the searchterm can be used.

As I´ve mentioned before, the ChannelType is Shopping and the API will 
throw an exception.
What could I do?

Thanks in advance.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"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+unsubscr...@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/57497837-b8b2-464b-8ef9-d2b62168f67b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.