Google::Adwords::Campaign - A Google Adwords Campaign Object


This documentation refers to Google::Adwords::Campaign version 0.0.1


    use Google::Adwords::Campaign;
    use Google::Adwords::CampaignService;

    # create a new campaign object
    my $campaign = Google::Adwords::Campaign;

    # set values for the campaign object
    $campaign->name('My Final Try');

    # target a certain city in US
       cities => [ 'Pelican, AK US' ], 
    # create the campaign service object
    my $campaign_service = Google::Adwords::CampaignService->new();

    # need to login to the Adwords service

    # if you use a MCC

    # now create the campaign
    my $campaign_response = $campaign_service->addCampaign($campaign);

    print "New campaign ID is :" . $campaign_response->id;


This object should be used with the CampaignService API calls


Mutators (read/write)

* dailyBudget

* enableSeparateContentBids

* name

* status

* startDay

* endDay

* languageTargeting

* geoTargeting

* networkTargeting

Accessors (read only)

* id

The following methods accept/return a hashref


    A hashref with keys:

    * languages - An arrayref of language codes

    Example usage:

        # set English and Hindi as my language targets
            languages => [ 'en', 'hi' ],

    The language codes are available here:


    A hashref with keys:

    * countries - An arrayref of country codes

    * regions - An arrayref of region codes

    * cities - An arrayref of city codes

    * metros - An arrayref of metro codes

    Example usage:

        # Set target countries as US and India
            countries => [ 'US', 'IN' ],
        # Only target Adelaide in Australia
            cities => [ 'Adelaide, SA AU' ],
        # By region, target Berlin in Germany
            regions => [ 'DE-BE' ],
        # By metros, target Los Angeles
            metros => [ '803' ],

    The codes are available here:

    countries -

    regions -

    cities (outside the US) -

    cities (in the US) -

    metros (in the US) -

    From the Adwords website:

      You can target campaigns by cities, countries, metros, and regions. However, a single campaign can only target one geographic area. For example, you can target a campaign by countries or regions, but not both. You can specify multiple values within a single type of geographic area. For example, you could target a campaign by more than one country.

    More info is here:


    A hashref with keys:

    * networkTypes => arrayref of network names

    Exmaple usage:

        # target only the google search network
            networkTypes => [ 'GoogleSearch' ],

    The network types are:

    * GoogleSearch

    * SearchNetwork

    * ContentNetwork

    From the Adwords website:

      When creating a new campaign, if no targeting is specified, the default targeting is GoogleSearch. SearchNetwork encompasses GoogleSearch, so GoogleSearch need not be specified when this value is included.

    More info is here:



Rohan Almeida <>


Copyright (c) 2006 Rohan Almeida <>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.