Create Keyword Object Perl Microsoft::AdCenter

Posted by toobsco42 on Stack Overflow See other posts from Stack Overflow or by toobsco42
Published on 2012-04-10T22:06:01Z Indexed on 2012/04/11 17:29 UTC
Read the original article Hit count: 393

Filed under:
|
|
|
|

So I looked at the perldoc for the Microsoft::AdCenter module and it shows this as an example of how to create a keyword object:

~$ perldoc Microsoft::AdCenter

#Create a Keyword object
my $keyword = Microsoft::AdCenter::V7::CampaignManagementService::Keyword->new
           ->Text("some text")
           ->BroadMatchBid(Microsoft::AdCenter::V7::CampaignManagementService::Bid->new->Amount(0.1))
           ->ExactMatchBid(Microsoft::AdCenter::V7::CampaignManagementService::Bid->new->Amount(0.1));

However, doesn't this violate the new policy of using only one match type per keyword?

Campaign Management changes:

"Previously, you would create a single Keyword object and specify a bid value for each match that you wanted to bid on (for example, exact match or phrase match). If you did not specify a bid value at the keyword-level, adCenter used the default bid value specified at the ad group level.

Now, you must create a Keyword object for each match type that you want to bid on. For example, to bid on the keyword car by using exact match and phrase match, create a Keyword object and set the Text element to car and the ExactMatchBid element to a bid amount. Then, create a second Keyword object and set the Text element to car and PhraseMatchBid to a bid amount. When you add the keywords, you’ll get a unique keyword ID for each keyword and match-type combination."

© Stack Overflow or respective owner

Related posts about perl

Related posts about api