Uploaded image for project: 'Yell'
  1. Yell
  2. YELL-602

seupdate.sh --accounts targeting handling for Bing

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: Bing-Integration
    • Fix Version/s: Bing-Integration
    • Component/s: AdMax
    • Labels:
      None
    • Environment:

      hosts file matches yell-ec-xml2

      Description

      (email sent to Ramesh and Jeff T.)

      I think I found another copy & paste error. In Agency, seupdate.sh --accounts does not get targeting information for MSN/Bing. In changeset 2127, it looks like most of GoogleAPISearchEngine.java was copied into BingAPISearchEngine.java. As a result, the getAccounts method calls getTargets (was getTargetLists in that revision, became getTargets in rev 2208). This is not called in Agency. Was this intended to be added for Bing?

      I remember Ana did a lot of work on this for Google and I ported those changes into Agency. TargetDAO class is quite Google-specific. If this was intended for Bing, I believe more work is required to get Bing-specific targets.

      I think that line that grabs the targeting information should be removed from BingAPISearchEngine.java. Once it's removed, getAccounts method will match Agency's.

      remove:

      Target[] targetLists = theBingAPI.getTargets(campaign.getId());

      change return FROM:

      ret.put(id, new SearchEngineAccountWrapper(acct, mapper.getTSATargeting(targetLists, campaign)));

      TO

      ret.put(id, new SearchEngineAccountWrapper(acct));

      ================

      Updated with response from Jeph...

      seems like it is okay to have targeting information be retrieved for Bing, but we need to rename some of the classes it references that have Google in the name and make it a more generic name so Bing isn't referencing "Google" code.

      For example, BingTargetMapper uses GoogleProximityTarget

      /**

      • Map from Bing target classes to TSA target classes.
      • @return

      */

      public Targets getTSATargeting(com.microsoft.adcenter.v8.Target[] aTargetList, Campaign aCampaign) {

      Targets ret = new Targets();

      CountryTarget country;

      RadiusTarget proximity;

      Collection<GoogleProximityTarget> proximityTargets = new ArrayList<GoogleProximityTarget>();

      List<Target> targets = new ArrayList<Target>(15);

      for (com.microsoft.adcenter.v8.Target target : aTargetList) {

      if(target.getLocation() == null)

      { continue; // we only handle location targets s(country and proximities }

      if((country = target.getLocation().getCountryTarget()) != null) {

      for (CountryTargetBid countryBid : country.getBids())

      { addTarget(targets, TargetType.country, countryBid.getCountryAndRegion(), null); }

      }

      if((proximity = target.getLocation().getRadiusTarget()) != null) {

      for (RadiusTargetBid targetBid : proximity.getBids()) {

      int latitude = (int) targetBid.getLatitudeDegrees() * 1000000;

      int longitude = (int) targetBid.getLongitudeDegrees() * 1000000;

      String measuringUnit = ProximityDistanceUnits.MILES.toString();

      double radius = targetBid.getRadius(); // change arg from int to double?

      double radiusInMeters = 0;

      if (measuringUnit.equals(ProximityDistanceUnits.KILOMETERS.getValue()))

      { radiusInMeters = radius * 1000; }

      else if (measuringUnit

      .equals(ProximityDistanceUnits.MILES.getValue()))

      { radiusInMeters = radius * 1609.344; }

      proximityTargets.add(new GoogleProximityTarget(0, latitude, longitude, (int) radiusInMeters));

      }

      addProximityTarget(targets, TargetType.proximity, GoogleProximityType.Circle.name(), proximityTargets);

      }

      }

      ret.setTargets(targets);

      return ret;

      }

        Attachments

          Activity

            People

            • Assignee:
              muhammad.abbas Muhammad Abbas (Inactive)
              Reporter:
              caitlyn Caitlyn Duggan (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: