Package com.google.api.ads.dfp.axis.v201311

Examples of com.google.api.ads.dfp.axis.v201311.ActivityGroup


      // Create action.
      com.google.api.ads.dfp.axis.v201311.DeactivatePlacements action =
          new com.google.api.ads.dfp.axis.v201311.DeactivatePlacements();

      // Perform action.
      UpdateResult result =
          placementService.performPlacementAction(action, statementBuilder.toStatement());

      if (result != null && result.getNumChanges() > 0) {
        System.out.printf("Number of placements deactivated: %d\n", result.getNumChanges());
      } else {
        System.out.println("No placements were deactivated.");
      }
    }
  }
View Full Code Here


        new LongCreativeTemplateVariableValue();
    imageHeightVariableValue.setUniqueName("Imageheight");
    imageHeightVariableValue.setValue(250L);

    // Create the URL variable value.
    UrlCreativeTemplateVariableValue urlVariableValue =
        new UrlCreativeTemplateVariableValue();
    urlVariableValue.setUniqueName("ClickthroughURL");
    urlVariableValue.setValue("www.google.com");

    // Create the target window variable value.
    StringCreativeTemplateVariableValue targetWindowVariableValue =
        new StringCreativeTemplateVariableValue();
    targetWindowVariableValue.setUniqueName("Targetwindow");
View Full Code Here

      // Set the ID of the company for the activity group.
      Long advertiserCompanyId = Long.parseLong("INSERT_ADVERTISER_COMPANY_ID_HERE");

      // Create a short-term activity group.
      ActivityGroup shortTermActivityGroup = new ActivityGroup();
      shortTermActivityGroup.setName("Short-term activity group #" + new Random().nextLong());
      shortTermActivityGroup.setCompanyIds(new long[] {advertiserCompanyId});
      shortTermActivityGroup.setClicksLookback(1);
      shortTermActivityGroup.setImpressionsLookback(1);

      // Create a long-term activity group.
      ActivityGroup longTermActivityGroup = new ActivityGroup();
      longTermActivityGroup.setName("Long-term activity group #" + new Random().nextLong());
      longTermActivityGroup.setCompanyIds(new long[] {advertiserCompanyId});
      longTermActivityGroup.setClicksLookback(30);
      longTermActivityGroup.setImpressionsLookback(30);

      // Create the activity groups on the server.
      ActivityGroup[] activityGroups = activityGroupService.createActivityGroups(
          new ActivityGroup[] {shortTermActivityGroup, longTermActivityGroup});
View Full Code Here

      // Set the ID of the activity group and the company to update it with.
      Integer activityGroupId = Integer.parseInt("INSERT_ACTIVITY_GROUP_ID_HERE");
      Long advertiserCompanyId = Long.parseLong("INSERT_ADVERTISER_COMPANY_ID_HERE");

      // Get the activity group.
      ActivityGroup activityGroup = activityGroupService.getActivityGroup(activityGroupId);

      long[] companyIds = Arrays.copyOf(
          activityGroup.getCompanyIds(), activityGroup.getCompanyIds().length + 1);

      companyIds[companyIds.length - 1] = advertiserCompanyId;

      // Update the companies.
      activityGroup.setCompanyIds(companyIds);

      // Update the activity group on the server.
      ActivityGroup[] activityGroups =
          activityGroupService.updateActivityGroups(new ActivityGroup[] {activityGroup});
View Full Code Here

      // Set the ID of the activity group and the company to update it with.
      Integer activityGroupId = Integer.parseInt("INSERT_ACTIVITY_GROUP_ID_HERE");
      Long advertiserCompanyId = Long.parseLong("INSERT_ADVERTISER_COMPANY_ID_HERE");

      // Get the activity group.
      ActivityGroup activityGroup = activityGroupService.getActivityGroup(activityGroupId);

      long[] companyIds = Arrays.copyOf(
          activityGroup.getCompanyIds(), activityGroup.getCompanyIds().length + 1);

      companyIds[companyIds.length - 1] = advertiserCompanyId;

      // Update the companies.
      activityGroup.setCompanyIds(companyIds);

      // Update the activity group on the server.
      ActivityGroup[] activityGroups =
          activityGroupService.updateActivityGroups(new ActivityGroup[] {activityGroup});
View Full Code Here

      // Set the ID of the company for the activity group.
      Long advertiserCompanyId = Long.parseLong("INSERT_ADVERTISER_COMPANY_ID_HERE");

      // Create a short-term activity group.
      ActivityGroup shortTermActivityGroup = new ActivityGroup();
      shortTermActivityGroup.setName("Short-term activity group #" + new Random().nextLong());
      shortTermActivityGroup.setCompanyIds(new long[] {advertiserCompanyId});
      shortTermActivityGroup.setClicksLookback(1);
      shortTermActivityGroup.setImpressionsLookback(1);

      // Create a long-term activity group.
      ActivityGroup longTermActivityGroup = new ActivityGroup();
      longTermActivityGroup.setName("Long-term activity group #" + new Random().nextLong());
      longTermActivityGroup.setCompanyIds(new long[] {advertiserCompanyId});
      longTermActivityGroup.setClicksLookback(30);
      longTermActivityGroup.setImpressionsLookback(30);

      // Create the activity groups on the server.
      ActivityGroup[] activityGroups = activityGroupService.createActivityGroups(
          new ActivityGroup[] {shortTermActivityGroup, longTermActivityGroup});
View Full Code Here

      // Set the ID of the activity group and the company to update it with.
      Integer activityGroupId = Integer.parseInt("INSERT_ACTIVITY_GROUP_ID_HERE");
      Long advertiserCompanyId = Long.parseLong("INSERT_ADVERTISER_COMPANY_ID_HERE");

      // Get the activity group.
      ActivityGroup activityGroup = activityGroupService.getActivityGroup(activityGroupId);

      long[] companyIds = Arrays.copyOf(
          activityGroup.getCompanyIds(), activityGroup.getCompanyIds().length + 1);

      companyIds[companyIds.length - 1] = advertiserCompanyId;

      // Update the companies.
      activityGroup.setCompanyIds(companyIds);

      // Update the activity group on the server.
      ActivityGroup[] activityGroups =
          activityGroupService.updateActivityGroups(new ActivityGroup[] {activityGroup});
View Full Code Here

      // Set the ID of the company for the activity group.
      Long advertiserCompanyId = Long.parseLong("INSERT_ADVERTISER_COMPANY_ID_HERE");

      // Create a short-term activity group.
      ActivityGroup shortTermActivityGroup = new ActivityGroup();
      shortTermActivityGroup.setName("Short-term activity group #" + new Random().nextLong());
      shortTermActivityGroup.setCompanyIds(new long[] {advertiserCompanyId});
      shortTermActivityGroup.setClicksLookback(1);
      shortTermActivityGroup.setImpressionsLookback(1);

      // Create a long-term activity group.
      ActivityGroup longTermActivityGroup = new ActivityGroup();
      longTermActivityGroup.setName("Long-term activity group #" + new Random().nextLong());
      longTermActivityGroup.setCompanyIds(new long[] {advertiserCompanyId});
      longTermActivityGroup.setClicksLookback(30);
      longTermActivityGroup.setImpressionsLookback(30);

      // Create the activity groups on the server.
      ActivityGroup[] activityGroups = activityGroupService.createActivityGroups(
          new ActivityGroup[] {shortTermActivityGroup, longTermActivityGroup});
View Full Code Here

      // Set the ID of the activity group and the company to update it with.
      Integer activityGroupId = Integer.parseInt("INSERT_ACTIVITY_GROUP_ID_HERE");
      Long advertiserCompanyId = Long.parseLong("INSERT_ADVERTISER_COMPANY_ID_HERE");

      // Get the activity group.
      ActivityGroup activityGroup = activityGroupService.getActivityGroup(activityGroupId);

      long[] companyIds = Arrays.copyOf(
          activityGroup.getCompanyIds(), activityGroup.getCompanyIds().length + 1);

      companyIds[companyIds.length - 1] = advertiserCompanyId;

      // Update the companies.
      activityGroup.setCompanyIds(companyIds);

      // Update the activity group on the server.
      ActivityGroup[] activityGroups =
          activityGroupService.updateActivityGroups(new ActivityGroup[] {activityGroup});
View Full Code Here

      // Set the ID of the company for the activity group.
      Long advertiserCompanyId = Long.parseLong("INSERT_ADVERTISER_COMPANY_ID_HERE");

      // Create a short-term activity group.
      ActivityGroup shortTermActivityGroup = new ActivityGroup();
      shortTermActivityGroup.setName("Short-term activity group #" + new Random().nextLong());
      shortTermActivityGroup.setCompanyIds(new long[] {advertiserCompanyId});
      shortTermActivityGroup.setClicksLookback(1);
      shortTermActivityGroup.setImpressionsLookback(1);

      // Create a long-term activity group.
      ActivityGroup longTermActivityGroup = new ActivityGroup();
      longTermActivityGroup.setName("Long-term activity group #" + new Random().nextLong());
      longTermActivityGroup.setCompanyIds(new long[] {advertiserCompanyId});
      longTermActivityGroup.setClicksLookback(30);
      longTermActivityGroup.setImpressionsLookback(30);

      // Create the activity groups on the server.
      ActivityGroup[] activityGroups = activityGroupService.createActivityGroups(
          new ActivityGroup[] {shortTermActivityGroup, longTermActivityGroup});
View Full Code Here

TOP

Related Classes of com.google.api.ads.dfp.axis.v201311.ActivityGroup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.