Google-Ads-AdWords-Client

 view release on metacpan or  search on metacpan

examples/v201809/basic_operations/update_ad_group.pl  view on Meta::CPAN

use Google::Ads::AdWords::v201809::Money;

use Cwd qw(abs_path);

# Replace with valid values of your account.
my $ad_group_id = "INSERT_AD_GROUP_ID_HERE";
# Set this to undef if you do not want to update the CPC bid.
my $cpc_bid_micro_amount = "INSERT_CPC_BID_MICRO_AMOUNT_HERE";

# Example main subroutine.
sub update_ad_group {
  my ($client, $ad_group_id, $cpc_bid_micro_amount) = @_;
  # Create an ad group with the specified ID.
  # Pause the ad group.
  my $ad_group = Google::Ads::AdWords::v201809::AdGroup->new({
    id     => $ad_group_id,
    status => "PAUSED"
  });

  # Update the CPC bid if specified.
  if ($cpc_bid_micro_amount) {

examples/v201809/basic_operations/update_campaign.pl  view on Meta::CPAN

use Google::Ads::AdWords::Logging;
use Google::Ads::AdWords::v201809::Campaign;
use Google::Ads::AdWords::v201809::CampaignOperation;

use Cwd qw(abs_path);

# Replace with valid values of your account.
my $campaign_id = "INSERT_CAMPAIGN_ID_HERE";

# Example main subroutine.
sub update_campaign {
  my $client      = shift;
  my $campaign_id = shift;

  # Create campaign with updated status.
  my $campaign = Google::Ads::AdWords::v201809::Campaign->new({
      id     => $campaign_id,
      status => "PAUSED"
  });

  # Create operation.

examples/v201809/basic_operations/update_expanded_text_ad.pl  view on Meta::CPAN

use Google::Ads::AdWords::v201809::AdOperation;
use Google::Ads::AdWords::v201809::ExpandedTextAd;

use Cwd qw(abs_path);
use Data::Uniqid qw(uniqid);

# Replace with valid values of your account.
my $ad_id = "INSERT_AD_ID_HERE";

# Example main subroutine.
sub update_expanded_text_ad {
    my ($client, $ad_id) = @_;

    my @operations = ();
    # Creates an expanded text ad using the provided ad ID.
    my $expanded_text_ad = Google::Ads::AdWords::v201809::ExpandedTextAd->new({
        id              => $ad_id,
        headlinePart1   => "Cruise to Pluto #" . substr(uniqid(), 0, 8),
        headlinePart2   => "Tickets on sale now",
        description     => "Best space cruise ever.",
        finalUrls       => [ "http://www.example.com/" ],

examples/v201809/basic_operations/update_keyword.pl  view on Meta::CPAN

use Google::Ads::AdWords::v201809::BiddableAdGroupCriterion;
use Google::Ads::AdWords::v201809::Criterion;

use Cwd qw(abs_path);

# Replace with valid values of your account.
my $ad_group_id = "INSERT_AD_GROUP_ID_HERE";
my $keyword_id  = "INSERT_KEYWORD_ID_HERE";

# Example main subroutine.
sub update_keyword {
  my $client      = shift;
  my $ad_group_id = shift;
  my $keyword_id  = shift;

  # Create base class criterion to avoid setting keyword specific fields.
  my $criterion =
    Google::Ads::AdWords::v201809::Criterion->new({id => $keyword_id,});

  # Create ad group criterion.
  my $ad_group_criterion =

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.682 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )