删除关键字 [英] Delete Keywords

查看:121
本文介绍了删除关键字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在update关键字程序中删除和/或暂停关键字。但是我没有开始使用广告系列管理服务来改变关键字状态。有人在这方面帮助我。

I want to delete and or pause keywords in the update keyword program. But I am not getting on how to change the keyword status using the campaignmanagement servicePlease someone help me in this regards.

static void UpdateKeywords(long accountId,long adGroupId,Keyword [] keywords,long Key,double Key1)

{

static void UpdateKeywords(long accountId, long adGroupId, Keyword[] keywords, long Key, double Key1)
{

UpdateKeywordsRequest request = new UpdateKeywordsRequest();

UpdateKeywordsResponse response = null;

List< Keyword> updatedKeywords = new List< Keyword>();

string bidType = null;

double bid = 0.0;

UpdateKeywordsRequest request = new UpdateKeywordsRequest();
UpdateKeywordsResponse response = null;
List<Keyword> updatedKeywords = new List<Keyword>();
string bidType = null;
double bid = 0.0;

//更新关键字。将Param2更改为"20%折扣"和
//将出价提高15%。

// Update the keywords. Change Param2 to "20% off" and
// increase the bid by 15%.

//使用列表<>如果将错误的关键字ID传递给

//获取,在这种情况下,列表中的关键字项将为空。

// Using a List<> in case a bad keyword ID was passed to
// Get, in which case, the keyword item in the list will be null.

foreach(关键字关键字in关键字)

{

if(null!= keyword)

{

foreach (Keyword keyword in keywords)
{
if (null != keyword)
{

Keyword updatedKeyword = new Keyword() ;

updatedKeyword.Id = keyword.Id;

updatedKeyword.Param2 =" 20%off";

Console.WriteLine(" keyword Id :" + updatedKeyword.Id);

bidType = GetBidType(关键字,出价);

Console.WriteLine("出价的价值"+出价); < br>
Console.WriteLine(>传递后的keyId" + Key);

Console.WriteLine(" bid bid amount:" + Key1);



Console.WriteLine("当前关键字状态:" + keyword.Status);

Keyword updatedKeyword = new Keyword();
updatedKeyword.Id = keyword.Id;
updatedKeyword.Param2 = "20% off";
Console.WriteLine("the keyword Id: " + updatedKeyword.Id);
bidType = GetBidType(keyword, out bid);
Console.WriteLine("the value of the bid" + bid);
Console.WriteLine("the keyId after passing" + Key);
Console.WriteLine("the bid increase amount: " + Key1);

Console.WriteLine("the current keyword status :" + keyword.Status);

if(updatedKeyword.Id == Key)

{

if(0.0!= bid)//如果为null,则不更新出价;继续使用
{//使用广告组的默认出价。

SetKeywordBid(updatedKeyword,bidType,bid * Key1);

}

if (updatedKeyword.Id == Key)
{
if (0.0 != bid) // Don't update bid if null; continue to
{ // use ad group's default bid.
SetKeywordBid(updatedKeyword, bidType, bid * Key1);
}

updatedKeywords.Add(updatedKeyword);

}

}

}

//设置标题信息。

updatedKeywords.Add(updatedKeyword);
}
}
}
// Set the header information.

request.CustomerAccountId = accountId.ToString();

request.DeveloperToken = m_token;

request.UserName = m_username;

request.Password = m_password;

request.CustomerAccountId = accountId.ToString();
request.DeveloperToken = m_token;
request.UserName = m_username;
request.Password = m_password;

//设置请求信息。

request.AdGroupId = adGroupId;

request.Keywords = updatedKeywords.ToArray();

request.AdGroupId = adGroupId;
request.Keywords = updatedKeywords.ToArray();



try

{

response = service。 UpdateKeywords(request);

}


try
{
response = service.UpdateKeywords(request);
}

问候,

Chiranjit Das  ;

Chiranjit Das 

推荐答案

嗨 -

有关如何处理的详细信息,请参阅以下帖子暂停了问题中描述的关键字。

Please refer to the following post for details on how to handle paused keyword as described in the question.

community.bingads.microsoft.com /.../ 77158.aspx

谢谢

Ravi Modalavalasa

Ravi Modalavalasa

项目经理 - Bing Ads

Program Manager - Bing Ads


这篇关于删除关键字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆