Search in sources :

Example 51 with Selector

use of com.google.api.ads.adwords.axis.v201809.cm.Selector in project googleads-java-lib by googleads.

the class EstimateKeywordTraffic method runExample.

/**
 * Runs the example.
 *
 * @param adWordsServices the services factory.
 * @param session the session.
 * @throws ApiException if the API request failed with one or more service errors.
 * @throws RemoteException if the API request failed due to other errors.
 */
public static void runExample(AdWordsServicesInterface adWordsServices, AdWordsSession session) throws RemoteException {
    // Get the TrafficEstimatorService.
    TrafficEstimatorServiceInterface trafficEstimatorService = adWordsServices.get(session, TrafficEstimatorServiceInterface.class);
    // Create keywords. Refer to the TrafficEstimatorService documentation for the maximum
    // number of keywords that can be passed in a single request.
    // https://developers.google.com/adwords/api/docs/reference/latest/TrafficEstimatorService
    List<Keyword> keywords = new ArrayList<Keyword>();
    Keyword marsCruiseKeyword = new Keyword();
    marsCruiseKeyword.setText("mars cruise");
    marsCruiseKeyword.setMatchType(KeywordMatchType.BROAD);
    keywords.add(marsCruiseKeyword);
    Keyword cheapCruiseKeyword = new Keyword();
    cheapCruiseKeyword.setText("cheap cruise");
    cheapCruiseKeyword.setMatchType(KeywordMatchType.PHRASE);
    keywords.add(cheapCruiseKeyword);
    Keyword cruiseKeyword = new Keyword();
    cruiseKeyword.setText("cruise");
    cruiseKeyword.setMatchType(KeywordMatchType.EXACT);
    keywords.add(cruiseKeyword);
    // Create a keyword estimate request for each keyword.
    List<KeywordEstimateRequest> keywordEstimateRequests = keywords.stream().map(keyword -> {
        KeywordEstimateRequest keywordEstimateRequest = new KeywordEstimateRequest();
        keywordEstimateRequest.setKeyword(keyword);
        return keywordEstimateRequest;
    }).collect(Collectors.toList());
    // Add a negative keyword to the traffic estimate.
    KeywordEstimateRequest negativeKeywordEstimateRequest = new KeywordEstimateRequest();
    negativeKeywordEstimateRequest.setKeyword(new Keyword(null, null, null, "hiking tour", KeywordMatchType.BROAD));
    negativeKeywordEstimateRequest.setIsNegative(true);
    keywordEstimateRequests.add(negativeKeywordEstimateRequest);
    // Create ad group estimate requests.
    List<AdGroupEstimateRequest> adGroupEstimateRequests = new ArrayList<AdGroupEstimateRequest>();
    AdGroupEstimateRequest adGroupEstimateRequest = new AdGroupEstimateRequest();
    adGroupEstimateRequest.setKeywordEstimateRequests(keywordEstimateRequests.toArray(new KeywordEstimateRequest[] {}));
    adGroupEstimateRequest.setMaxCpc(new Money(null, 1000000L));
    adGroupEstimateRequests.add(adGroupEstimateRequest);
    // Create campaign estimate requests.
    List<CampaignEstimateRequest> campaignEstimateRequests = new ArrayList<CampaignEstimateRequest>();
    CampaignEstimateRequest campaignEstimateRequest = new CampaignEstimateRequest();
    campaignEstimateRequest.setAdGroupEstimateRequests(adGroupEstimateRequests.toArray(new AdGroupEstimateRequest[] {}));
    Location unitedStates = new Location();
    unitedStates.setId(2840L);
    Language english = new Language();
    english.setId(1000L);
    campaignEstimateRequest.setCriteria(new Criterion[] { unitedStates, english });
    campaignEstimateRequests.add(campaignEstimateRequest);
    // Create selector.
    TrafficEstimatorSelector selector = new TrafficEstimatorSelector();
    selector.setCampaignEstimateRequests(campaignEstimateRequests.toArray(new CampaignEstimateRequest[] {}));
    // Optional: Request a list of campaign level estimates segmented by platform.
    selector.setPlatformEstimateRequested(true);
    // Get traffic estimates.
    TrafficEstimatorResult result = trafficEstimatorService.get(selector);
    // Display traffic estimates.
    if (result != null && result.getCampaignEstimates() != null && result.getCampaignEstimates().length > 0) {
        CampaignEstimate campaignEstimate = result.getCampaignEstimates()[0];
        // Display the campaign level estimates segmented by platform.
        if (campaignEstimate.getPlatformEstimates() != null) {
            for (PlatformCampaignEstimate platformEstimate : campaignEstimate.getPlatformEstimates()) {
                String platformMessage = String.format("Results for the platform with ID %d and name '%s':%n", platformEstimate.getPlatform().getId(), platformEstimate.getPlatform().getPlatformName());
                displayMeanEstimates(platformMessage, platformEstimate.getMinEstimate(), platformEstimate.getMaxEstimate());
            }
        }
        // Display the keyword estimates.
        KeywordEstimate[] keywordEstimates = campaignEstimate.getAdGroupEstimates()[0].getKeywordEstimates();
        for (int i = 0; i < keywordEstimates.length; i++) {
            if (Boolean.TRUE.equals(keywordEstimateRequests.get(i).getIsNegative())) {
                continue;
            }
            Keyword keyword = keywordEstimateRequests.get(i).getKeyword();
            KeywordEstimate keywordEstimate = keywordEstimates[i];
            String keywordMessage = String.format("Results for the keyword with text '%s' and match type '%s':%n", keyword.getText(), keyword.getMatchType());
            displayMeanEstimates(keywordMessage, keywordEstimate.getMin(), keywordEstimate.getMax());
        }
    } else {
        System.out.println("No traffic estimates were returned.");
    }
}
Also used : TrafficEstimatorServiceInterface(com.google.api.ads.adwords.axis.v201809.o.TrafficEstimatorServiceInterface) TrafficEstimatorResult(com.google.api.ads.adwords.axis.v201809.o.TrafficEstimatorResult) KeywordMatchType(com.google.api.ads.adwords.axis.v201809.cm.KeywordMatchType) AdGroupEstimateRequest(com.google.api.ads.adwords.axis.v201809.o.AdGroupEstimateRequest) ArrayList(java.util.ArrayList) CampaignEstimate(com.google.api.ads.adwords.axis.v201809.o.CampaignEstimate) OfflineCredentials(com.google.api.ads.common.lib.auth.OfflineCredentials) ApiException(com.google.api.ads.adwords.axis.v201809.cm.ApiException) Money(com.google.api.ads.adwords.axis.v201809.cm.Money) Credential(com.google.api.client.auth.oauth2.Credential) OAuthException(com.google.api.ads.common.lib.exception.OAuthException) AdWordsServices(com.google.api.ads.adwords.axis.factory.AdWordsServices) Language(com.google.api.ads.adwords.axis.v201809.cm.Language) ConfigurationLoadException(com.google.api.ads.common.lib.conf.ConfigurationLoadException) Keyword(com.google.api.ads.adwords.axis.v201809.cm.Keyword) Collectors(java.util.stream.Collectors) RemoteException(java.rmi.RemoteException) DEFAULT_CONFIGURATION_FILENAME(com.google.api.ads.common.lib.utils.Builder.DEFAULT_CONFIGURATION_FILENAME) List(java.util.List) AdWordsSession(com.google.api.ads.adwords.lib.client.AdWordsSession) AdWordsServicesInterface(com.google.api.ads.adwords.lib.factory.AdWordsServicesInterface) ApiError(com.google.api.ads.adwords.axis.v201809.cm.ApiError) ValidationException(com.google.api.ads.common.lib.exception.ValidationException) CampaignEstimateRequest(com.google.api.ads.adwords.axis.v201809.o.CampaignEstimateRequest) KeywordEstimate(com.google.api.ads.adwords.axis.v201809.o.KeywordEstimate) Criterion(com.google.api.ads.adwords.axis.v201809.cm.Criterion) Api(com.google.api.ads.common.lib.auth.OfflineCredentials.Api) Location(com.google.api.ads.adwords.axis.v201809.cm.Location) KeywordEstimateRequest(com.google.api.ads.adwords.axis.v201809.o.KeywordEstimateRequest) PlatformCampaignEstimate(com.google.api.ads.adwords.axis.v201809.o.PlatformCampaignEstimate) TrafficEstimatorSelector(com.google.api.ads.adwords.axis.v201809.o.TrafficEstimatorSelector) StatsEstimate(com.google.api.ads.adwords.axis.v201809.o.StatsEstimate) CampaignEstimateRequest(com.google.api.ads.adwords.axis.v201809.o.CampaignEstimateRequest) Keyword(com.google.api.ads.adwords.axis.v201809.cm.Keyword) ArrayList(java.util.ArrayList) AdGroupEstimateRequest(com.google.api.ads.adwords.axis.v201809.o.AdGroupEstimateRequest) KeywordEstimateRequest(com.google.api.ads.adwords.axis.v201809.o.KeywordEstimateRequest) Money(com.google.api.ads.adwords.axis.v201809.cm.Money) PlatformCampaignEstimate(com.google.api.ads.adwords.axis.v201809.o.PlatformCampaignEstimate) Language(com.google.api.ads.adwords.axis.v201809.cm.Language) CampaignEstimate(com.google.api.ads.adwords.axis.v201809.o.CampaignEstimate) PlatformCampaignEstimate(com.google.api.ads.adwords.axis.v201809.o.PlatformCampaignEstimate) TrafficEstimatorServiceInterface(com.google.api.ads.adwords.axis.v201809.o.TrafficEstimatorServiceInterface) TrafficEstimatorResult(com.google.api.ads.adwords.axis.v201809.o.TrafficEstimatorResult) TrafficEstimatorSelector(com.google.api.ads.adwords.axis.v201809.o.TrafficEstimatorSelector) Location(com.google.api.ads.adwords.axis.v201809.cm.Location) KeywordEstimate(com.google.api.ads.adwords.axis.v201809.o.KeywordEstimate)

Example 52 with Selector

use of com.google.api.ads.adwords.axis.v201809.cm.Selector in project googleads-java-lib by googleads.

the class AddTrial method runExample.

/**
 * Runs the example.
 *
 * @param adWordsServices the services factory.
 * @param session the session.
 * @param draftId the ID of the draft.
 * @param baseCampaignId the ID of the base campaign.
 * @throws ApiException if the API request failed with one or more service errors.
 * @throws RemoteException if the API request failed due to other errors.
 * @throws InterruptedException
 */
public static void runExample(AdWordsServicesInterface adWordsServices, AdWordsSession session, long draftId, long baseCampaignId) throws RemoteException, InterruptedException {
    // Get the TrialService.
    TrialServiceInterface trialService = adWordsServices.get(session, TrialServiceInterface.class);
    Trial trial = new Trial();
    trial.setDraftId(draftId);
    trial.setBaseCampaignId(baseCampaignId);
    trial.setName("Test Trial #" + System.currentTimeMillis());
    trial.setTrafficSplitPercent(50);
    trial.setTrafficSplitType(CampaignTrialTrafficSplitType.RANDOM_QUERY);
    TrialOperation trialOperation = new TrialOperation();
    trialOperation.setOperator(Operator.ADD);
    trialOperation.setOperand(trial);
    long trialId = trialService.mutate(new TrialOperation[] { trialOperation }).getValue(0).getId();
    // Since creating a trial is asynchronous, we have to poll it to wait for it to finish.
    Selector trialSelector = new SelectorBuilder().fields(TrialField.Id, TrialField.Status, TrialField.BaseCampaignId, TrialField.TrialCampaignId).equalsId(trialId).build();
    trial = null;
    boolean isPending = true;
    int pollAttempts = 0;
    do {
        long sleepSeconds = (long) Math.scalb(30d, pollAttempts);
        System.out.printf("Sleeping for %d seconds.%n", sleepSeconds);
        Thread.sleep(sleepSeconds * 1000);
        trial = trialService.get(trialSelector).getEntries(0);
        System.out.printf("Trial ID %d has status '%s'.%n", trial.getId(), trial.getStatus());
        pollAttempts++;
        isPending = TrialStatus.CREATING.equals(trial.getStatus());
    } while (isPending && pollAttempts < MAX_POLL_ATTEMPTS);
    if (TrialStatus.ACTIVE.equals(trial.getStatus())) {
        // The trial creation was successful.
        System.out.printf("Trial created with ID %d and trial campaign ID %d.%n", trial.getId(), trial.getTrialCampaignId());
    } else if (TrialStatus.CREATION_FAILED.equals(trial.getStatus())) {
        // The trial creation failed, and errors can be fetched from the TrialAsyncErrorService.
        Selector errorsSelector = new SelectorBuilder().fields(TrialAsyncErrorField.TrialId, TrialAsyncErrorField.AsyncError).equals(TrialAsyncErrorField.TrialId, trial.getId().toString()).build();
        TrialAsyncErrorServiceInterface trialAsyncErrorService = adWordsServices.get(session, TrialAsyncErrorServiceInterface.class);
        TrialAsyncErrorPage trialAsyncErrorPage = trialAsyncErrorService.get(errorsSelector);
        if (trialAsyncErrorPage.getEntries() == null || trialAsyncErrorPage.getEntries().length == 0) {
            System.out.printf("Could not retrieve errors for trial ID %d for draft ID %d.%n", trial.getId(), draftId);
        } else {
            System.out.printf("Could not create trial ID %d for draft ID %d due to the following errors:%n", trial.getId(), draftId);
            int i = 0;
            for (TrialAsyncError error : trialAsyncErrorPage.getEntries()) {
                ApiError asyncError = error.getAsyncError();
                System.out.printf("Error #%d: errorType='%s', errorString='%s', trigger='%s', fieldPath='%s'%n", i++, asyncError.getApiErrorType(), asyncError.getErrorString(), asyncError.getTrigger(), asyncError.getFieldPath());
            }
        }
    } else {
        // Most likely, the trial is still being created. You can continue polling,
        // but we have limited the number of attempts in the example.
        System.out.printf("Timed out waiting to create trial from draft ID %d with base campaign ID %d.%n", draftId, baseCampaignId);
    }
}
Also used : TrialServiceInterface(com.google.api.ads.adwords.axis.v201809.cm.TrialServiceInterface) Trial(com.google.api.ads.adwords.axis.v201809.cm.Trial) SelectorBuilder(com.google.api.ads.adwords.axis.utils.v201809.SelectorBuilder) TrialAsyncErrorPage(com.google.api.ads.adwords.axis.v201809.cm.TrialAsyncErrorPage) ApiError(com.google.api.ads.adwords.axis.v201809.cm.ApiError) TrialAsyncErrorServiceInterface(com.google.api.ads.adwords.axis.v201809.cm.TrialAsyncErrorServiceInterface) TrialOperation(com.google.api.ads.adwords.axis.v201809.cm.TrialOperation) TrialAsyncError(com.google.api.ads.adwords.axis.v201809.cm.TrialAsyncError) Selector(com.google.api.ads.adwords.axis.v201809.cm.Selector)

Example 53 with Selector

use of com.google.api.ads.adwords.axis.v201809.cm.Selector in project googleads-java-lib by googleads.

the class GetCampaigns method runExample.

/**
 * Runs the example.
 *
 * @param adWordsServices the services factory.
 * @param session the session.
 * @throws ApiException if the API request failed with one or more service errors.
 * @throws RemoteException if the API request failed due to other errors.
 */
public static void runExample(AdWordsServicesInterface adWordsServices, AdWordsSession session) throws RemoteException {
    // Get the CampaignService.
    CampaignServiceInterface campaignService = adWordsServices.get(session, CampaignServiceInterface.class);
    int offset = 0;
    // Create selector.
    SelectorBuilder builder = new SelectorBuilder();
    Selector selector = builder.fields(CampaignField.Id, CampaignField.Name).orderAscBy(CampaignField.Name).offset(offset).limit(PAGE_SIZE).build();
    CampaignPage page;
    do {
        // Get all campaigns.
        page = campaignService.get(selector);
        // Display campaigns.
        if (page.getEntries() != null) {
            for (Campaign campaign : page.getEntries()) {
                System.out.printf("Campaign with name '%s' and ID %d was found.%n", campaign.getName(), campaign.getId());
            }
        } else {
            System.out.println("No campaigns were found.");
        }
        offset += PAGE_SIZE;
        selector = builder.increaseOffsetBy(PAGE_SIZE).build();
    } while (offset < page.getTotalNumEntries());
}
Also used : CampaignServiceInterface(com.google.api.ads.adwords.axis.v201809.cm.CampaignServiceInterface) Campaign(com.google.api.ads.adwords.axis.v201809.cm.Campaign) SelectorBuilder(com.google.api.ads.adwords.axis.utils.v201809.SelectorBuilder) CampaignPage(com.google.api.ads.adwords.axis.v201809.cm.CampaignPage) Selector(com.google.api.ads.adwords.axis.v201809.cm.Selector)

Example 54 with Selector

use of com.google.api.ads.adwords.axis.v201809.cm.Selector in project googleads-java-lib by googleads.

the class GetAllImageAssets method runExample.

/**
 * Runs the example.
 *
 * @param adWordsServices the services factory.
 * @param session the session.
 * @throws ApiException if the API request failed with one or more service errors.
 * @throws RemoteException if the API request failed due to other errors.
 */
public static void runExample(AdWordsServicesInterface adWordsServices, AdWordsSession session) throws RemoteException {
    // Get the AdGroupAdService.
    AssetServiceInterface assetService = adWordsServices.get(session, AssetServiceInterface.class);
    int offset = 0;
    boolean morePages = true;
    // Create the selector.
    SelectorBuilder builder = new SelectorBuilder();
    Selector selector = builder.fields(AssetField.AssetName, AssetField.AssetStatus, AssetField.ImageFileSize, AssetField.ImageWidth, AssetField.ImageHeight, AssetField.ImageFullSizeUrl).offset(offset).limit(PAGE_SIZE).equals(AssetField.AssetSubtype, AssetType.IMAGE.getValue()).build();
    int totalEntries = 0;
    while (morePages) {
        // Get the image assets.
        AssetPage page = assetService.get(selector);
        // Display the results.
        if (page.getEntries() != null && page.getEntries().length > 0) {
            totalEntries = page.getTotalNumEntries();
            int i = selector.getPaging().getStartIndex();
            for (Asset asset : page.getEntries()) {
                System.out.printf("%d) Image asset with ID %d, name '%s', and status '%s' was found.%n", i, asset.getAssetId(), asset.getAssetName(), asset.getAssetStatus());
            }
        }
        offset += PAGE_SIZE;
        selector = builder.increaseOffsetBy(PAGE_SIZE).build();
        morePages = offset < page.getTotalNumEntries();
    }
    System.out.printf("Found %d image assets.%n", totalEntries);
}
Also used : SelectorBuilder(com.google.api.ads.adwords.axis.utils.v201809.SelectorBuilder) Asset(com.google.api.ads.adwords.axis.v201809.cm.Asset) AssetServiceInterface(com.google.api.ads.adwords.axis.v201809.cm.AssetServiceInterface) AssetPage(com.google.api.ads.adwords.axis.v201809.cm.AssetPage) Selector(com.google.api.ads.adwords.axis.v201809.cm.Selector)

Example 55 with Selector

use of com.google.api.ads.adwords.axis.v201809.cm.Selector in project googleads-java-lib by googleads.

the class GetCampaignsByLabel method runExample.

/**
 * Runs the example.
 *
 * @param adWordsServices the services factory.
 * @param session the session.
 * @param labelId the ID of the label.
 * @throws ApiException if the API request failed with one or more service errors.
 * @throws RemoteException if the API request failed due to other errors.
 */
public static void runExample(AdWordsServicesInterface adWordsServices, AdWordsSession session, Long labelId) throws RemoteException {
    // Get the CampaignService.
    CampaignServiceInterface campaignService = adWordsServices.get(session, CampaignServiceInterface.class);
    int offset = 0;
    // Create selector.
    SelectorBuilder builder = new SelectorBuilder();
    Selector selector = builder.fields(CampaignField.Id, CampaignField.Name, CampaignField.Labels).containsAny(CampaignField.Labels, labelId.toString()).orderAscBy(CampaignField.Name).offset(offset).limit(PAGE_SIZE).build();
    CampaignPage page = null;
    do {
        // Get all campaigns.
        page = campaignService.get(selector);
        // Display campaigns.
        if (page.getEntries() != null) {
            for (Campaign campaign : page.getEntries()) {
                String labels = Joiner.on(", ").join(Lists.transform(Lists.newArrayList(campaign.getLabels()), label -> String.format("%d/%s", label.getId(), label.getName())));
                System.out.printf("Campaign found with name '%s' and ID %d and labels: %s.%n", campaign.getName(), campaign.getId(), labels);
            }
        } else {
            System.out.println("No campaigns were found.");
        }
        offset += PAGE_SIZE;
        selector = builder.increaseOffsetBy(PAGE_SIZE).build();
    } while (offset < page.getTotalNumEntries());
}
Also used : OAuthException(com.google.api.ads.common.lib.exception.OAuthException) Parameter(com.beust.jcommander.Parameter) AdWordsServices(com.google.api.ads.adwords.axis.factory.AdWordsServices) ConfigurationLoadException(com.google.api.ads.common.lib.conf.ConfigurationLoadException) Campaign(com.google.api.ads.adwords.axis.v201809.cm.Campaign) CampaignServiceInterface(com.google.api.ads.adwords.axis.v201809.cm.CampaignServiceInterface) CampaignPage(com.google.api.ads.adwords.axis.v201809.cm.CampaignPage) CodeSampleParams(com.google.api.ads.common.lib.utils.examples.CodeSampleParams) SelectorBuilder(com.google.api.ads.adwords.axis.utils.v201809.SelectorBuilder) RemoteException(java.rmi.RemoteException) DEFAULT_CONFIGURATION_FILENAME(com.google.api.ads.common.lib.utils.Builder.DEFAULT_CONFIGURATION_FILENAME) AdWordsSession(com.google.api.ads.adwords.lib.client.AdWordsSession) AdWordsServicesInterface(com.google.api.ads.adwords.lib.factory.AdWordsServicesInterface) Lists(com.google.common.collect.Lists) ApiError(com.google.api.ads.adwords.axis.v201809.cm.ApiError) ValidationException(com.google.api.ads.common.lib.exception.ValidationException) CampaignField(com.google.api.ads.adwords.lib.selectorfields.v201809.cm.CampaignField) OfflineCredentials(com.google.api.ads.common.lib.auth.OfflineCredentials) ApiException(com.google.api.ads.adwords.axis.v201809.cm.ApiException) Api(com.google.api.ads.common.lib.auth.OfflineCredentials.Api) Selector(com.google.api.ads.adwords.axis.v201809.cm.Selector) ArgumentNames(com.google.api.ads.adwords.lib.utils.examples.ArgumentNames) Credential(com.google.api.client.auth.oauth2.Credential) Joiner(com.google.common.base.Joiner) CampaignServiceInterface(com.google.api.ads.adwords.axis.v201809.cm.CampaignServiceInterface) Campaign(com.google.api.ads.adwords.axis.v201809.cm.Campaign) SelectorBuilder(com.google.api.ads.adwords.axis.utils.v201809.SelectorBuilder) CampaignPage(com.google.api.ads.adwords.axis.v201809.cm.CampaignPage) Selector(com.google.api.ads.adwords.axis.v201809.cm.Selector)

Aggregations

Selector (com.google.api.ads.adwords.axis.v201809.cm.Selector)36 Test (org.junit.Test)27 SelectorBuilder (com.google.api.ads.adwords.axis.utils.v201809.SelectorBuilder)22 Selector (com.google.api.ads.adwords.jaxws.v201809.cm.Selector)14 ArrayList (java.util.ArrayList)9 SimpleDateFormat (java.text.SimpleDateFormat)7 DateFormat (java.text.DateFormat)6 DateTime (org.joda.time.DateTime)6 ApiException (com.google.api.ads.adwords.axis.v201809.cm.ApiException)5 CampaignPage (com.google.api.ads.adwords.axis.v201809.cm.CampaignPage)5 CampaignServiceInterface (com.google.api.ads.adwords.axis.v201809.cm.CampaignServiceInterface)5 OrderBy (com.google.api.ads.adwords.jaxws.v201809.cm.OrderBy)4 Predicate (com.google.api.ads.adwords.jaxws.v201809.cm.Predicate)4 ConfigurationLoadException (com.google.api.ads.common.lib.conf.ConfigurationLoadException)4 OAuthException (com.google.api.ads.common.lib.exception.OAuthException)4 ValidationException (com.google.api.ads.common.lib.exception.ValidationException)4 RemoteException (java.rmi.RemoteException)4 AdWordsServices (com.google.api.ads.adwords.axis.factory.AdWordsServices)3 AdGroupAd (com.google.api.ads.adwords.axis.v201809.cm.AdGroupAd)3 AdGroupAdPage (com.google.api.ads.adwords.axis.v201809.cm.AdGroupAdPage)3