ErikEvenson / googleads-node-lib

17 stars 23 forks source link

TargetingIdeaService error #10

Open Madses opened 7 years ago

Madses commented 7 years ago

Hi,

I wrote this code to get TargetingIdeas based on a keyword but it doesnt seem to work and i have no Idea why that might be. Could anyone please help me, I have been stuck with this for days now.

var TargetingIdeaService = user.getService('TargetingIdeaService', 'v201609')

//create selector 
var selector={
    SearchParameter:[{RelatedToQuerySearchParameter:'Games'}],
    IdeaType:'KEYWORDS',
    requestType:'IDEAS',
    requestedAttributeTypes: ['TARGETED_MONTHLY_SEAsRCHES', 'KEYWORD_TEXT'],
    paging: {startIndex: 0, numberResults:20}
}

TargetingIdeaService.get({serviceSelector: selector}, function (error, result) {
    console.log(error, result);
}) 
Madses commented 7 years ago

var TargetingIdeaService = user.getService('TargetingIdeaService', 'v201609')

//create selector var selector={ searchParameters:[{ xsi_type: 'RelatedToQuerySearchParameter', queries: ['donald trump'], }], ideaType:'KEYWORD', requestType:'STATS', requestedAttributeTypes:['KEYWORD_TEXT'], paging: {startIndex: 0, numberResults:20} }

TargetingIdeaService.get({TargetingIdeaSelector: selector}, function (error, result) { console.log(error, result); }) New code

maran1989 commented 6 years ago

Hello,

Do you know how to add the networkSetting parameter in the selector?