Got a problem here, i'm trying to get specific conversion data out from a campaign.
I have a Campaign with a label, this campaign has 100 conversions where 22 is from TV, 44 from Internet and 34 from mobile ( 4 custom columns total i need data from ).
I can get the total number of conversions out, but not find a way to find these specific numbers (from TV, internet, mobile etc.).
I've used campaign performance report and adgroup performance report to get total conversions out, but couldn't find the segment i needed there, seems like if it should be anywhare, it would be in adgroup?
I don't get any exceptions when i'm using ConversionsManyPerClick, but i don't get any data out.
All in all - How can i extract specific conversion data by segments-conversionname?
public void GetAdGroups(AdWordsUser user)
{
AdGroupService adGroupService =
(AdGroupService) user.GetService(AdWordsService.v201506.AdGroupService);
// Create the selector.
Selector selector = new Selector();
selector.fields = new string[] { "Id", "Name", "ConversionsManyPerClick" }; // "custCol1039323", "custCol1050091", "custCol1039920", "custCol1050388" };
// Create the filters.
Predicate predicate = new Predicate();
predicate.field = "CampaignId";
predicate.@operator = PredicateOperator.EQUALS;
predicate.values = new string[] {campaignId.ToString()};
selector.predicates = new Predicate[] {predicate};
// Set the selector paging.
selector.paging = new Paging();
int offset = 0;
int pageSize = 500;
AdGroupPage page = new AdGroupPage();
try {
do {
selector.paging.startIndex = offset;
selector.paging.numberResults = pageSize;
// Get the ad groups.
page = adGroupService.get(selector);
// Display the results.
if (page != null && page.entries != null) {
int i = offset;
foreach (AdGroup adGroup in page.entries) {
Debug.WriteLine("{0}) Ad group name is '{1}' and id is {2}.", i + 1, adGroup.name,
adGroup.id);
i++;
}
}
offset += pageSize;
} while (offset < page.totalNumEntries);
Debug.WriteLine("Number of ad groups found: {0}", page.totalNumEntries);
} catch (Exception ex) {
throw new System.ApplicationException("Failed to retrieve ad groups.", ex);
}
}