Examples of ThirdPartyRedirectAd


Examples of com.google.api.ads.adwords.axis.v201306.cm.ThirdPartyRedirectAd

    // Get the AdGroupAdService.
    AdGroupAdServiceInterface adGroupAdService =
        adWordsServices.get(session, AdGroupAdServiceInterface.class);

    // Create third party redirect ad.
    ThirdPartyRedirectAd thirdPartyRedirectAd = new ThirdPartyRedirectAd();
    thirdPartyRedirectAd.setName("Example third party ad #" + System.currentTimeMillis());
    thirdPartyRedirectAd.setUrl("http://www.example.com");
    thirdPartyRedirectAd.setDimensions(new Dimensions(300, 250));
    // This field normally contains the javascript ad tag.
    thirdPartyRedirectAd.setSnippet("<img src=\"http://goo.gl/HJM3L\"/>");
    // DoubleClick Rich Media Expandable format ID.
    thirdPartyRedirectAd.setCertifiedVendorFormatId(232L);
    thirdPartyRedirectAd.setIsCookieTargeted(false);
    thirdPartyRedirectAd.setIsUserInterestTargeted(false);
    thirdPartyRedirectAd.setIsTagged(false);

    thirdPartyRedirectAd.setExpandingDirections(new ThirdPartyRedirectAdExpandingDirection[] {
        ThirdPartyRedirectAdExpandingDirection.EXPANDING_UP,
        ThirdPartyRedirectAdExpandingDirection.EXPANDING_DOWN});
    thirdPartyRedirectAd.setAdAttributes(
        new RichMediaAdAdAttribute[] {RichMediaAdAdAttribute.ROLL_OVER_TO_EXPAND});

    // Create ad group ad.
    AdGroupAd adGroupAd1 = new AdGroupAd();
    adGroupAd1.setAdGroupId(adGroupId);
    adGroupAd1.setAd(thirdPartyRedirectAd);

    ThirdPartyRedirectAd inStreamVideo = new ThirdPartyRedirectAd();
    inStreamVideo.setName("Example third party ad #" + System.currentTimeMillis());
    inStreamVideo.setUrl("http://www.example.com");
    inStreamVideo.setAdDuration(15000);
    inStreamVideo.setSourceUrl("http://ad.doubleclick.net/pfadx/N270.126913.6102203221521/"
        + "B3876671.21;dcadv=2215309;sz=0x0;ord=%5btimestamp%5d;dcmt=text/xml");
    inStreamVideo.setCertifiedVendorFormatId(303L);
    inStreamVideo.setRichMediaAdType(RichMediaAdRichMediaAdType.IN_STREAM_VIDEO);

    // Create ad group ad.
    AdGroupAd adGroupAd2 = new AdGroupAd();
    adGroupAd2.setAdGroupId(adGroupId);
    adGroupAd2.setAd(inStreamVideo);
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201309.cm.ThirdPartyRedirectAd

    // Get the AdGroupAdService.
    AdGroupAdServiceInterface adGroupAdService =
        adWordsServices.get(session, AdGroupAdServiceInterface.class);

    // Create third party redirect ad.
    ThirdPartyRedirectAd thirdPartyRedirectAd = new ThirdPartyRedirectAd();
    thirdPartyRedirectAd.setName("Example third party ad #" + System.currentTimeMillis());
    thirdPartyRedirectAd.setUrl("http://www.example.com");
    thirdPartyRedirectAd.setDimensions(new Dimensions(300, 250));
    // This field normally contains the javascript ad tag.
    thirdPartyRedirectAd.setSnippet("<img src=\"http://goo.gl/HJM3L\"/>");
    // DoubleClick Rich Media Expandable format ID.
    thirdPartyRedirectAd.setCertifiedVendorFormatId(232L);
    thirdPartyRedirectAd.setIsCookieTargeted(false);
    thirdPartyRedirectAd.setIsUserInterestTargeted(false);
    thirdPartyRedirectAd.setIsTagged(false);

    thirdPartyRedirectAd.setExpandingDirections(new ThirdPartyRedirectAdExpandingDirection[] {
        ThirdPartyRedirectAdExpandingDirection.EXPANDING_UP,
        ThirdPartyRedirectAdExpandingDirection.EXPANDING_DOWN});
    thirdPartyRedirectAd.setAdAttributes(
        new RichMediaAdAdAttribute[] {RichMediaAdAdAttribute.ROLL_OVER_TO_EXPAND});

    // Create ad group ad.
    AdGroupAd adGroupAd1 = new AdGroupAd();
    adGroupAd1.setAdGroupId(adGroupId);
    adGroupAd1.setAd(thirdPartyRedirectAd);

    ThirdPartyRedirectAd inStreamVideo = new ThirdPartyRedirectAd();
    inStreamVideo.setName("Example third party ad #" + System.currentTimeMillis());
    inStreamVideo.setUrl("http://www.example.com");
    inStreamVideo.setAdDuration(15000);
    inStreamVideo.setSourceUrl("http://ad.doubleclick.net/pfadx/N270.126913.6102203221521/"
        + "B3876671.21;dcadv=2215309;sz=0x0;ord=%5btimestamp%5d;dcmt=text/xml");
    inStreamVideo.setCertifiedVendorFormatId(303L);
    inStreamVideo.setRichMediaAdType(RichMediaAdRichMediaAdType.IN_STREAM_VIDEO);

    // Create ad group ad.
    AdGroupAd adGroupAd2 = new AdGroupAd();
    adGroupAd2.setAdGroupId(adGroupId);
    adGroupAd2.setAd(inStreamVideo);
View Full Code Here

Examples of com.google.api.adwords.v201306.cm.ThirdPartyRedirectAd

          user.getService(AdWordsService.V201306.ADGROUP_AD_SERVICE);

      long adGroupId = Long.parseLong("INSERT_ADGROUP_ID_HERE");

      // Create third party redirect ad.
      ThirdPartyRedirectAd thirdPartyRedirectAd = new ThirdPartyRedirectAd();
      thirdPartyRedirectAd.setName("Example third party ad #" + System.currentTimeMillis());
      thirdPartyRedirectAd.setUrl("http://www.example.com");
      thirdPartyRedirectAd.setDimensions(new Dimensions(300, 250));
      // This field normally contains the javascript ad tag.
      thirdPartyRedirectAd.setSnippet(
          "<img src=\"http://goo.gl/HJM3L\"/>");
      // DoubleClick Rich Media Expandable format ID.
      thirdPartyRedirectAd.setCertifiedVendorFormatId(232L);
      thirdPartyRedirectAd.setIsCookieTargeted(false);
      thirdPartyRedirectAd.setIsUserInterestTargeted(false);
      thirdPartyRedirectAd.setIsTagged(false);

      thirdPartyRedirectAd.setExpandingDirections(new ThirdPartyRedirectAdExpandingDirection[] {
          ThirdPartyRedirectAdExpandingDirection.EXPANDING_UP,
          ThirdPartyRedirectAdExpandingDirection.EXPANDING_DOWN});
      thirdPartyRedirectAd.setAdAttributes(
          new RichMediaAdAdAttribute[] {RichMediaAdAdAttribute.ROLL_OVER_TO_EXPAND});

      // Set RichMedia ad type
      thirdPartyRedirectAd.setRichMediaAdType(RichMediaAdRichMediaAdType.fromValue("STANDARD"));

      // Create ad group ad.
      AdGroupAd adGroupAd = new AdGroupAd();
      adGroupAd.setAdGroupId(adGroupId);
      adGroupAd.setAd(thirdPartyRedirectAd);

      // Create operations.
      AdGroupAdOperation adGroupAdOperation = new AdGroupAdOperation();
      adGroupAdOperation.setOperand(adGroupAd);
      adGroupAdOperation.setOperator(Operator.ADD);

      // Create In Stream ad.
      ThirdPartyRedirectAd inStreamAd = new ThirdPartyRedirectAd();
      inStreamAd.setName("Cruise to Mars #" + System.currentTimeMillis());
      inStreamAd.setUrl("http://www.example.com");
      inStreamAd.setSourceUrl("http://www.example.com");
      inStreamAd.setAdDuration(15000);
      inStreamAd.setUrl(
          "http://ad.doubleclick.net/pfadx/N270.126913.6102203221521/B3876671.21;dcadv=2215309;sz=0x0;ord=%5btimestamp%5d;dcmt=text/xml");
      inStreamAd.setCertifiedVendorFormatId(303L);
      inStreamAd.setRichMediaAdType(RichMediaAdRichMediaAdType.fromValue("IN_STREAM_VIDEO"));

      // Create ad group ad.
      AdGroupAd adGroupAd2 = new AdGroupAd();
      adGroupAd2.setAdGroupId(adGroupId);
      adGroupAd2.setAd(inStreamAd);
View Full Code Here

Examples of com.google.api.adwords.v201309.cm.ThirdPartyRedirectAd

          user.getService(AdWordsService.V201309.ADGROUP_AD_SERVICE);

      long adGroupId = Long.parseLong("INSERT_ADGROUP_ID_HERE");

      // Create third party redirect ad.
      ThirdPartyRedirectAd thirdPartyRedirectAd = new ThirdPartyRedirectAd();
      thirdPartyRedirectAd.setName("Example third party ad #" + System.currentTimeMillis());
      thirdPartyRedirectAd.setUrl("http://www.example.com");
      thirdPartyRedirectAd.setDimensions(new Dimensions(300, 250));
      // This field normally contains the javascript ad tag.
      thirdPartyRedirectAd.setSnippet(
          "<img src=\"http://goo.gl/HJM3L\"/>");
      // DoubleClick Rich Media Expandable format ID.
      thirdPartyRedirectAd.setCertifiedVendorFormatId(232L);
      thirdPartyRedirectAd.setIsCookieTargeted(false);
      thirdPartyRedirectAd.setIsUserInterestTargeted(false);
      thirdPartyRedirectAd.setIsTagged(false);

      thirdPartyRedirectAd.setExpandingDirections(new ThirdPartyRedirectAdExpandingDirection[] {
          ThirdPartyRedirectAdExpandingDirection.EXPANDING_UP,
          ThirdPartyRedirectAdExpandingDirection.EXPANDING_DOWN});
      thirdPartyRedirectAd.setAdAttributes(
          new RichMediaAdAdAttribute[] {RichMediaAdAdAttribute.ROLL_OVER_TO_EXPAND});

      // Set RichMedia ad type
      thirdPartyRedirectAd.setRichMediaAdType(RichMediaAdRichMediaAdType.fromValue("STANDARD"));

      // Create ad group ad.
      AdGroupAd adGroupAd = new AdGroupAd();
      adGroupAd.setAdGroupId(adGroupId);
      adGroupAd.setAd(thirdPartyRedirectAd);

      // Create operations.
      AdGroupAdOperation adGroupAdOperation = new AdGroupAdOperation();
      adGroupAdOperation.setOperand(adGroupAd);
      adGroupAdOperation.setOperator(Operator.ADD);

      // Create In Stream ad.
      ThirdPartyRedirectAd inStreamAd = new ThirdPartyRedirectAd();
      inStreamAd.setName("Cruise to Mars #" + System.currentTimeMillis());
      inStreamAd.setUrl("http://www.example.com");
      inStreamAd.setSourceUrl("http://www.example.com");
      inStreamAd.setAdDuration(15000);
      inStreamAd.setUrl(
          "http://ad.doubleclick.net/pfadx/N270.126913.6102203221521/B3876671.21;dcadv=2215309;sz=0x0;ord=%5btimestamp%5d;dcmt=text/xml");
      inStreamAd.setCertifiedVendorFormatId(303L);
      inStreamAd.setRichMediaAdType(RichMediaAdRichMediaAdType.fromValue("IN_STREAM_VIDEO"));

      // Create ad group ad.
      AdGroupAd adGroupAd2 = new AdGroupAd();
      adGroupAd2.setAdGroupId(adGroupId);
      adGroupAd2.setAd(inStreamAd);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.