Google-Ads-GoogleAds-Client

 view release on metacpan or  search on metacpan

CHANGELOG.md  view on Meta::CPAN

- Removed code examples: add_local_campaign, add_dynamic_page_feed,
  add_smart_display_ad, add_shopping_smart_ad, and migration folder.
- Bump perl version to 5.32.1.
- Updated examples: add_performance_max_retail_campaign, add_smart_campaign,
  create_experiment, forecast_reach.
- Replace handle_expanded_text_ad_policy_violations example with
  handle_responsive_search_ad_policy_violations.

13.1.1 - 2022-09-15
-------------------
- Updated the default redirect_uri, used in generate_user_credentials example,
  to remove OOB redirect. See relevant blog post:
  https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html.

13.1.0 - 2022-08-22
-------------------
- Added support for Google Ads API v11_1.
- Added code examples: generate_historical_metrics.
- Improved code examples: set_custom_client_timeouts.
- Updated examples to remove references to expanded text ads.

CHANGELOG.md  view on Meta::CPAN

- Added code examples: create_experiment, detect_and_apply_recommendations.
- Removed code examples: create_campaign_experiment, graduate_campaign_experiment.
- Updated add_smart_campaign example.
- Updated the FieldMasks utility to better handle empty object fields. See updated guide:
  https://developers.google.com/google-ads/api/docs/client-libs/perl/field-masks.

11.0.0 - 2022-04-28
-------------------
- Added support for Google Ads API v10_1.
- Removed support for Google Ads API v8_0.
- Renamed authenticate_in_web_application to generate_user_credentials and updated
  to support the desktop application flow, since OAuth OOB is being deprecated.
- Removed authenticate_in_desktop_application code example.
- Updated add_customer_match_user_list code example.

10.0.1 - 2022-03-30
-------------------
- Added code examples: add_performance_max_product_listing_group_tree,
  navigate_search_result_pages_caching_tokens.
- Updated code examples: add_campaigns, add_performance_max_campaign,
  add_performance_max_retail_campaign, upload_offline_conversion.

MANIFEST  view on Meta::CPAN

examples/advanced_operations/create_and_attach_shared_keyword_set.pl
examples/advanced_operations/find_and_remove_criteria_from_shared_set.pl
examples/advanced_operations/get_ad_group_bid_modifiers.pl
examples/advanced_operations/use_cross_account_bidding_strategy.pl
examples/advanced_operations/use_portfolio_bidding_strategy.pl
examples/assets/add_call.pl
examples/assets/add_hotel_callout.pl
examples/assets/add_lead_form_asset.pl
examples/assets/add_prices.pl
examples/assets/add_sitelinks.pl
examples/authentication/generate_user_credentials.pl
examples/basic_operations/add_ad_groups.pl
examples/basic_operations/add_campaigns.pl
examples/basic_operations/get_campaigns.pl
examples/basic_operations/get_responsive_search_ads.pl
examples/basic_operations/pause_ad.pl
examples/basic_operations/remove_campaign.pl
examples/basic_operations/update_ad_group.pl
examples/basic_operations/update_campaign.pl
examples/basic_operations/update_responsive_search_ad.pl
examples/billing/add_account_budget_proposal.pl

README.md  view on Meta::CPAN


[![CPAN version](https://badge.fury.io/pl/Google-Ads-GoogleAds-Client.svg)](https://badge.fury.io/pl/Google-Ads-GoogleAds-Client)
![Build Status](https://storage.googleapis.com/gaa-clientlibs/badges/google-ads-perl/buildstatus_ubuntu.svg)

This project hosts the Perl client library for the [Google Ads
API](https://developers.google.com/google-ads/api/docs/start).

## Features

  * Distributed via [CPAN](https://metacpan.org/release/Google-Ads-GoogleAds-Client).
  * Easy management of credentials.
  * Easy creation of Google Ads API service clients.

## Requirements

  * Perl 5.24.1+

## Getting started

1.  Clone this project in the directory of your choice via:

README.md  view on Meta::CPAN

    *   `googleads.properties`: the sample configuration file for the library.
    *   `log4perl.conf`: the sample logging configuration file.

1.  Now run the following command at the command prompt. This will install all
    dependencies needed for using the library and running examples.

        cpan install Module::Build
        perl Build.PL
        perl Build installdeps

1.  Set up your OAuth2 credentials.

    The Google Ads API uses [OAuth2](http://oauth.net/2/) as the authentication
    mechanism. Choose the appropriate option below based on your use case, and
    read and follow the instructions that the example prints to the console.

    **If you already have credentials for the AdWords API...**

    *   If you have the `adwords.properties` file you used for the AdWords API,
        copy and name it as `googleads.properties`. Simply change the key names
        in the new configuration file as below:

            oAuth2ClientId       --> clientId
            oAuth2ClientSecret   --> clientSecret
            oAuth2RefreshToken   --> refreshToken
            developerToken       --> developerToken

        If you are authenticating as a manager account, additionally you must
        specify:

            loginCustomerId --> Manager account ID (with hyphens removed).

    **If you're accessing the Google Ads API using your own credentials...**

    *   Copy the sample [`googleads.properties`](googleads.properties)
        to your [home directory](https://en.wikipedia.org/wiki/Home_directory#Default_home_directory_per_operating_system).

    *   Follow the instructions at
        https://developers.google.com/google-ads/api/docs/oauth/cloud-project
        to create an OAuth2 client ID and secret for the **Desktop app**
        OAuth2 flow.

    *   Run the
        [generate_user_credentials](examples/authentication/generate_user_credentials.pl)
        example, by providing your OAuth2 client ID and secret as the parameters.

    *   Copy the output from the last step of the example into the
        `googleads.properties` file in your home directory. Don't forget to fill
        in your developer token too.

    **If you're accessing the Google Ads API on behalf of clients...**

    *   Copy the sample [`googleads.properties`](googleads.properties)
        to your [home directory](https://en.wikipedia.org/wiki/Home_directory#Default_home_directory_per_operating_system).

    *   Follow the instructions at
        https://developers.google.com/google-ads/api/docs/oauth/cloud-project
        to create an OAuth2 client ID and secret for the **Web application**
        OAuth2 flow.

    *   Run the
        [generate_user_credentials](examples/authentication/generate_user_credentials.pl)
        example, by providing your OAuth2 client ID and secret as the parameters.

    *   Copy the output from the last step of the example into the
        `googleads.properties` file in your home directory. Don't forget to fill
        in your developer token too.

1.  Run the [get_campaigns](examples/basic_operations/get_campaigns.pl) example
    to test if your credentials are valid. You also need to pass your Google Ads
    account's customer ID as a command-line parameter:

        perl examples/basic_operations/get_campaigns.pl -customer_id <YOUR_CUSTOMER_ID>

    **NOTE**: Code examples are meant to be run from command prompt, not via the
    web browsers.

1.  Explore other examples.

    The [examples](examples) directory contains several useful examples. Most of

examples/account_management/create_customer.pl  view on Meta::CPAN

#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This example illustrates how to create a new customer under a given manager
# account.
#
# Note: This example must be run using the credentials of a Google Ads manager
# account. By default, the new account will only be accessible via the manager
# account.

use strict;
use warnings;
use utf8;

use FindBin qw($Bin);
use lib "$Bin/../../lib";
use Google::Ads::GoogleAds::Client;

examples/account_management/create_customer.pl  view on Meta::CPAN


  return 1;
}
# [END create_customer]

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions("manager_customer_id=s" => \$manager_customer_id);

# Print the help message if the parameters are not initialized in the code nor
# in the command line.

examples/account_management/create_customer.pl  view on Meta::CPAN

=pod

=head1 NAME

create_customer

=head1 DESCRIPTION

This example illustrates how to create a new customer under a given manager account.

Note: This example must be run using the credentials of a Google Ads manager account.
By default, the new account will only be accessible via the manager account.

=head1 SYNOPSIS

create_customer.pl [options]

    -help                       Show the help message.
    -manager_customer_id        The Google Ads manager customer ID.

=cut

examples/account_management/get_account_hierarchy.pl  view on Meta::CPAN

    printf "The hierarchy of customer ID %d is printed below:\n",
      $root_customer_id;
    print_account_hierarchy($root_customer_clients->{$root_customer_id},
      $all_hierarchies->{$root_customer_id}, 0);
    print "\n";
  }

  return 1;
}

# Retrieves a list of accessible customers with the provided set up credentials.
sub get_accessible_customers {
  my $api_client = shift;

  my $accessible_customer_ids = [];
  # Issue a request for listing all customers accessible by this authenticated
  # Google account.
  my $list_accessible_customers_response =
    $api_client->CustomerService()->list_accessible_customers();

  print "No manager customer ID is specified. The example will print the " .

examples/account_management/get_account_hierarchy.pl  view on Meta::CPAN

        $depth + 1);
    }
  }
}

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions(
  "manager_customer_id=s" => \$manager_customer_id,
  "login_customer_id=s"   => \$login_customer_id
);

examples/account_management/get_change_details.pl  view on Meta::CPAN

    print "Unknown change_resource_type $resource_type.\n";
  }
}
# [END get_change_details]

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions("customer_id=s" => \$customer_id);

# Print the help message if the parameters are not initialized in the code nor
# in the command line.

examples/account_management/get_change_summary.pl  view on Meta::CPAN

    return "";
  }
}
# [END get_change_summary]

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions("customer_id=s" => \$customer_id);

# Print the help message if the parameters are not initialized in the code nor
# in the command line.

examples/account_management/invite_user_with_access_role.pl  view on Meta::CPAN


  return 1;
}
# [END invite_user_with_access_role]

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions(
  "customer_id=s"   => \$customer_id,
  "email_address=s" => \$email_address,
  "access_role=s"   => \$access_role

examples/account_management/link_manager_to_client.pl  view on Meta::CPAN

# either specify these by changing the INSERT_XXX_ID_HERE values below, or on
# the command line.
#
# Parameters passed on the command line will override any parameters set in
# code.
#
# Running the example with -h will print the command line usage.
my $manager_customer_id = "INSERT_MANAGER_CUSTOMER_ID_HERE";
my $customer_id         = "INSERT_CUSTOMER_ID_HERE";

# This example assumes that the same credentials will work for both customers,
# but that may not be the case. If you need to use different credentials
# for each customer, then you may either update the client configuration or
# instantiate two clients, one for each set of credentials. Always make sure
# to update the configuration before fetching any services you need to use.
# [START link_manager_to_client]
sub link_manager_to_client {
  my ($api_client, $manager_customer_id, $api_client_customer_id) = @_;

  # Step 1: Extend an invitation to the client customer while authenticating
  # as the manager.
  $api_client->set_login_customer_id($manager_customer_id);

  # Create a customer client link.

examples/account_management/link_manager_to_client.pl  view on Meta::CPAN


  return 1;
}
# [END link_manager_to_client]

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions(
  "manager_customer_id=s" => \$manager_customer_id,
  "customer_id=s"         => \$customer_id
);

examples/account_management/list_accessible_customers.pl  view on Meta::CPAN


  return 1;
}
# [END list_accessible_customers]

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions();

# Call the example.
list_accessible_customers($api_client);

examples/account_management/update_user_access.pl  view on Meta::CPAN

  printf
    "Successfully modified customer user access with resource name '%s'.\n",
    $user_access_response->{result}{resourceName};
}

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions(
  "customer_id=s"   => \$customer_id,
  "email_address=s" => \$email_address,
  "access_role=s"   => \$access_role

examples/account_management/verify_advertiser_identity.pl  view on Meta::CPAN

  $api_client->AdvertiserIdentityVerificationService()
    ->start_identity_verification($request);
}
# [END verify_advertiser_identity_2]

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

my $customer_id;

# Parameters passed on the command line will override any parameters set in code.
GetOptions("customer_id=s" => \$customer_id);

examples/advanced_operations/add_ad_customizer.pl  view on Meta::CPAN

  my $ad_group_ad_resource_name = $response->{results}[0]{resourceName};
  printf "Added an ad with resource name '%s'.\n", $ad_group_ad_resource_name;
}
# [END add_ad_customizer_3]

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

my $customer_id = undef;
my $ad_group_id = undef;

# Parameters passed on the command line will override any parameters set in code.
GetOptions(

examples/advanced_operations/add_ad_group_bid_modifier.pl  view on Meta::CPAN


  return 1;
}
# [END add_ad_group_bid_modifier]

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions(
  "customer_id=s"        => \$customer_id,
  "ad_group_id=i"        => \$ad_group_id,
  "bid_modifier_value=f" => \$bid_modifier_value

examples/advanced_operations/add_app_campaign.pl  view on Meta::CPAN

  return Google::Ads::GoogleAds::V20::Common::AdTextAsset->new({
    text => $text
  });
}

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions("customer_id=s" => \$customer_id);

# Print the help message if the parameters are not initialized in the code nor
# in the command line.

examples/advanced_operations/add_bidding_data_exclusion.pl  view on Meta::CPAN

  # [END add_bidding_data_exclusion]

  return 1;
}

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions(
  "customer_id=s"     => \$customer_id,
  "start_date_time=s" => \$start_date_time,
  "end_date_time=s"   => \$end_date_time

examples/advanced_operations/add_bidding_seasonality_adjustment.pl  view on Meta::CPAN

  # [END add_bidding_seasonality_adjustment]

  return 1;
}

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions(
  "customer_id=s"              => \$customer_id,
  "start_date_time=s"          => \$start_date_time,
  "end_date_time=s"            => \$end_date_time,

examples/advanced_operations/add_call_ad.pl  view on Meta::CPAN

    $ad_group_ad_response->{results}[0]{resourceName};

  return 1;
}

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions(
  "customer_id=s"          => \$customer_id,
  "ad_group_id=i"          => \$ad_group_id,
  "phone_country=s"        => \$phone_country,

examples/advanced_operations/add_display_upload_ad.pl  view on Meta::CPAN

  # Display the resulting ad group ad's resource name.
  printf "Created new ad group ad '%s'.\n",
    $response->{results}[0]{resourceName};
}

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions(
  "customer_id=s" => \$customer_id,
  "ad_group_id=i" => \$ad_group_id,
);

examples/advanced_operations/add_dynamic_page_feed_asset.pl  view on Meta::CPAN

  printf "Created ad group criterion with resource name '%s'.\n",
    $response->{results}[0]{resourceName};
  # [END add_dsa_target]
}

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions(
  "customer_id=s" => \$customer_id,
  "campaign_id=i" => \$campaign_id,
  "ad_group_id=i" => \$ad_group_id

examples/advanced_operations/add_dynamic_search_ads.pl  view on Meta::CPAN


  printf "Created ad group criterion '%s'.\n",
    $ad_group_criterion_resource_name;
}

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions("customer_id=s" => \$customer_id);

# Print the help message if the parameters are not initialized in the code nor
# in the command line.

examples/advanced_operations/add_performance_max_campaign.pl  view on Meta::CPAN

      $response->{$result_type}{resourceName};
  }
}
# [END add_performance_max_campaign]

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

my $customer_id              = undef;
my $audience_id              = undef;
my $brand_guidelines_enabled = "false";

# Parameters passed on the command line will override any parameters set in code.

examples/advanced_operations/add_responsive_search_ad_full.pl  view on Meta::CPAN

  foreach my $campaign_criterion_result (@$campaign_criterion_results) {
    printf "\t%s\n", $campaign_criterion_result->{resourceName};
  }
}

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

my $customer_id;
my $customizer_attribute_name;

# Parameters passed on the command line will override any parameters set in code.
GetOptions(

examples/advanced_operations/add_smart_campaign.pl  view on Meta::CPAN


    printf "Created a(n) $entity_name with resource name '$resource_name'.\n";
  }
}

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions(
  "customer_id=s"               => \$customer_id,
  "keyword_text=s"              => \$keyword_text,
  "free_form_keyword_text=s"    => \$free_form_keyword_text,

examples/advanced_operations/create_and_attach_shared_keyword_set.pl  view on Meta::CPAN

  printf "Created campaign shared set: '%s'.\n",
    $campaign_shared_sets_response->{results}[0]{resourceName};
  return 1;
}

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions("customer_id=s" => \$customer_id, "campaign_id=i" => \$campaign_id);

# Print the help message if the parameters are not initialized in the code nor
# in the command line.

examples/advanced_operations/find_and_remove_criteria_from_shared_set.pl  view on Meta::CPAN

  }

  return 1;
}

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions("customer_id=s" => \$customer_id, "campaign_id=i" => \$campaign_id);

# Print the help message if the parameters are not initialized in the code nor
# in the command line.

examples/advanced_operations/get_ad_group_bid_modifiers.pl  view on Meta::CPAN

  }

  return 1;
}

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

my $customer_id = undef;
my $ad_group_id = undef;

# Parameters passed on the command line will override any parameters set in code.
GetOptions(

examples/advanced_operations/use_cross_account_bidding_strategy.pl  view on Meta::CPAN

  printf "Updated campaign with resource name '%s'.\n",
    $campaigns_response->{results}[0]{resourceName};
}
# [END attach_strategy]

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions(
  "customer_id=s"         => \$customer_id,
  "manager_customer_id=s" => \$manager_customer_id,
  "campaign_id=i"         => \$campaign_id

examples/advanced_operations/use_portfolio_bidding_strategy.pl  view on Meta::CPAN


  printf "Created a campaign with resource name: '%s'.\n",
    $campaign_resource_name;
}

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions(
  "customer_id=s"        => \$customer_id,
  "campaign_budget_id=i" => \$campaign_budget_id
);

examples/assets/add_call.pl  view on Meta::CPAN

      operations => [$customer_asset_operation]});
  printf "Created a customer asset with resource name: '%s'.\n",
    $response->{results}[0]{resourceName};
}

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions(
  "customer_id=s"          => \$customer_id,
  "phone_country=s"        => \$phone_country,
  "phone_number=s"         => \$phone_number,



( run in 0.348 second using v1.01-cache-2.11-cpan-4d50c553e7e )