AdWords
3.8K members online now
3.8K members online now
Dive into advanced features like Remarketing, Flexible Bid Strategies, AdWords Editor, and AdWords Scripts
Guide Me
star_border
Reply

Ad params in ad text.

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

As i understand, method setAdParam can be applied on keyword level, e.g. keyword.setAdParam(1,'data')

I have no idea how to use such params. It would be great if smb tell me. how it can be applicable while using on a keyword level.

 

But, the main question is! Let's imagine that we have an ad. Like this ->

 

Nice title of a shop
Buy some candies
On {param1:10} coins

 

Using params data looks logical. How can i use it in such way?

I was hoping that such piece of code would resolve my problem

 

var SPREADSHEET_URL = "URL";
var spreadsheet = SpreadsheetApp.openByUrl(SPREADSHEET_URL);
var sheet = spreadsheet.getActiveSheet()
var data = sheet.getRange("A:C").getValues();
var [cn,ag,param1] = data[i];

var adGroups = AdWordsApp.adGroups()
.withCondition("AdGroupName = '"+ag+"'")
.withCondition("CampaignName = '"+cn+"'")
.get();

while (adGroups.hasNext()) {
var ad = adGroups.next();
//Logger.log('ad' + ad)
ad.setAdParam(1,param1); // Fatal Error! What's the correct method?
}

 

But there is no way to add an adParam to the text ad, otherwise in documentation is noticed https://developers.google.com/adwords/api/docs/guides/ad-parameters that -
An AdParam value is set for the Keyword, AdGroup

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by Theresa_Zook (Top Contributor Alumni)
September 2015

Re: Ad params in ad text.

Top Contributor
# 2
Top Contributor

Hello,

 

Did you try posting this question over Adwords API forum?

 

This is the link to it: https://groups.google.com/forum/#!forum/adwords-api

 

Pankaj

View solution in original post

Marked as Best Answer.
Solution
Accepted by Theresa_Zook (Top Contributor Alumni)
September 2015

Re: Ad params in ad text.

Top Contributor
# 2
Top Contributor

Hello,

 

Did you try posting this question over Adwords API forum?

 

This is the link to it: https://groups.google.com/forum/#!forum/adwords-api

 

Pankaj