Google::Adwords::AdGroup - A Google Adwords AdGroup Object


Google-Adwords documentation  | view source Contained in the Google-Adwords distribution.

Index


NAME

Top

Google::Adwords::AdGroup - A Google Adwords AdGroup Object

VERSION

Top

This documentation refers to Google::Adwords::AdGroup version 0.2

SYNOPSIS

Top

    use Google::Adwords::AdGroup;
    use Google::Adwords::AdGroupService;

    # create a new adgroup object
    my $adgroup = Google::Adwords::AdGroup->new;

    # in campaign having ID 4567
    my $campaign_id = 4567;

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

    # create the adgroup service object
    my $adgroup_service = Google::Adwords::AdGroupService->new();

    # need to login to the Adwords service
    $adgroup_service->email($email_address)
                     ->password($password)
                     ->developerToken($developer_token)
                     ->applicationToken($application_token);

    # if you use a MCC
    #$adgroup_service->clientEmail($client_email);
    # or 
    $adgroup_service->clientCustomerId($customerid);

    # now create the adgroup 
    my $adgroup_response = $adgroup_service->addAdGroup($campaign_id, $adgroup);

    print "New adgroup ID is :" . $adgroup_response->id;

  


DESCRIPTION

Top

This object should be used with the AdGroupService API calls

METHODS

Top

Mutators (read/write)

* name

* campaignId

* maxCpm

* maxCpc

* maxContentCpc

* proxyMaxCpc

* status

Accessors (read only)

* id

SEE ALSO

Top

* Google::Adwords::AdGroupService

AUTHOR

Top

Rohan Almeida <rohan@almeida.in>

Mathieu Jondet <mathieu@eulerian.com>

LICENSE AND COPYRIGHT

Top


Google-Adwords documentation  | view source Contained in the Google-Adwords distribution.