Introduction:

  • Integration of Yahoo ads via a custom java script tag. 

  • Your partner manager will create each tag for you based on what features you require. 

  • We can help you customize your implementation to match your site. 

How to Implement: 

Implementing requires three core pieces of code - ad serving code, individual ad tags and configuration code.  Here’s how they work together:

  • Ad Serving code: This consists of the code that identifies the script and specifies the variables to be passed to the code.  Code is to be place in the head section. It will look like this: 

 
<script src='https://s.yimg.com/uv/dm/scripts/syndication.js'></script>

  • Ad unit code: If you have multiple ad units on the page, place these where you want ads to appear on the page. Here are two examples: 

Example of ad unit 1:  

 
<style>#myDivAdUnit1 iframe{width:100%}</style> <div id="myDivAdUnit1"></div>

Example of ad unit 2:  

 
<style>#myDivAdUnit2 iframe{width:100%}</style> <div id="myDivAdUnit2"></div> 

Note: If you are showing multiple ad units on a page, each should have its own ad style and div. 

  • Configuration code: Code is to be placed AFTER the last div on the page. 
 
<script type="text/javascript"> 
window.ypaAds.insertMultiAd({
ypaAdConfig :"000000000", 
ypaAdTypeTag :"MyTypeTag", 
ypaAdTagOptions : {
    SponsoredSearch : {
    Mobile : {
        SrcTag : "<your mobile source tag>" 
    }
},
ypaAdTrafficType : “test”,
ypaPubParams : {
    query : '<your search term>'
},
ypaAdSlotInfo : [ 
{ 
/*where AdUnit1 ads are inserted*/
/*optional*/ 
/*Name of your ad unit in YPA*/ ypaAdDivId :"myDivAdUnit1",
/*YourDivIdfortheadunit*/ ypaAdSlotId : "AdUnit1",
/*optional*/ 
}, 
]
}); </script>

What it looks like:

Supported Variables

  • Type tag: Here you are specifying the type tag, what we’ve traditionally called the affid, into the tag.

  • Test mode: If you are just testing traffic, you can pass this so that searches and clicks will be ignored for revenue and traffic quality calculations. 

  • Keyword: The ad unit dynamically picks up the keyword from the url string. As long as your urls have a common representation of the keyword in the url there should not be any issues with the pick up. If you believe there will be issues please notify your account manager for further discussion. 

Available Ad Display Options

Your partner manager will work with you to determine the features you’d like, then we’ll build the tag for you to incorporate them. 

  • Favicons: A Favicon is a graphical image (usually the logo) that is displayed to highlight the “perfect” ad for branded or navigational queries.

  • Merchant Ratings: Merchant Ratings are star ratings plus number of reviews the advertiser/merchant has.

  • Sitelinks: Sitelink extensions are additional text plus URL pairs (up to six) that provide links to an advertiser’s website. These links provide more specific access points into the advertiser’s website to drive searchers to exactly the information they are looking to find.

  • Dynamic CSS: Ability for you to apply custom CSS for the formatting of the Ad Tag. Partner CSS will need to conform to YPA HTML Classes.

  • 3rd Party Ads:  Callback functionality for when zero ads are returned, so you can make ad request to a 3rd party as backfill.

  • Content Backfill: Yahoo Content Match ads will “backfill” ad listings to reach your max ad listing count for the ad call

  • LocalAds: Local Ads are ads with extended local attributes for users who are located near advertiser’s business location inside the targeted area.

  • Long Ad Titles (LAT): A feature that displays longer ad titles. Long Ad Titles will append the domain name or part of the description to the original ad title. 

  • Images in Ads: Images can now be included in ads. Note: There is a separate configuration for images in DeskTop ads and Mobile ads. Configuration as follows:

 
ypaAdSlotInfo:{
  [
    ypaAdSlotId : ‘AdUnit1’,
    ypaAdDivId  : ‘myDivAdUnit1’,
    ypaSlotOptions: { 
      TemplateOptions: {
        DeskTop: {  
          ImageInAds: {
            align: "left",
            size: "70x70"
          }
        },
        Mobile: {
          ImageInAds: {
            align: "left",
            size: "70x70"
          }
        }
      }
    } 
  ]
}

Beaconing Options:

Currently we have optional impression and click beaconing options. If the client would like to support the beacons, they need to supply us with end points for tracking. The end points are hard coded on the server side interface. The affid used will be relayed into the impression beacon as 'ty'. The keyword searched will be realyed in the impression beacon as 'q'. The remaining tracking elements that are appended to the beacon urls are defined server side by Yahoo.

The values returned in each beacon are as follows:
--------------------------------------
The impression beacon has the following appended:

  • id = impression ID (generated server side)
  • ts = unix_timestamp
  • slotId = location in page
  • q = keyword
  • u = landing page url
  • ty = affid
  • nq = number of ads requested for that ad unit / slot (New)
  • nr = number of ads returned for that ad unit / slot (New)

---------------------------------------
The click beacon will have the following appended:

  • cts = unix timestamp  of click
  • id = coresponding impression ID
  • ts = unix timestamp of impression
  • slotid = location in page
  • rk = position of the ad that was clicked in the ad unit / slot (New)

Client-Side Configuration of YPA Ads

In addition to the basic configuration listed above, there are some additional configuration options available. Some of these are required and are marked as such, but most of them are optional.

Here is an example configuration:

window.ypaAds.insertMultiAd({
    ypaPubParams:{
        query:"addidasshoes", // Required if there is no keyword 
                              // parameter in the serving page's url
        location:"Burbank,CA"
    },
    ypaAdTagOptions:{
        SponsoredSearch:{
            Mobile:{
                SrcTag:"ss_src_tag_mobile"
            },
        },
        adultFilter:false,//'true' means allow, 'false' means don't
        clickBeacon:"click=true&serve=false", //string of key value pairs, 
        serveBeacon:"click=false&serve=true", //which is appended to beacon URL 
    },
    ypaAdConfig:"000000005", // required. Will be provided by Inuvo.
    ypaAdTypeTag:"typeTag", // required. Will be provided by Inuvo.
    ypaAdTrafficType:"test", // "test" is the only allowed value. Exclude this 
                             // option if not testing
    ypaAdSlotInfo:[{
        ypaAdSlotId:"north", // required
        ypaAdDivId:"ypaAdWrapper-MainNorth", // required
        ypaAdWidth:"300",
        ypaAdHeight:"100",
        ypaOnNoAd: postittoscreen, // Function to call if no ads are returned
        ypaSlotOptions:{
            AdOptions:{
                Mobile:{
                    AdRange:"1-2",
                    Lat:false,
                    Favicon:true,
                    LocalAds:true,
                    SiteLink:false,
                    MerchantRating:false,
                    ImageInAds:false
                },
                DeskTop:{
                    AdRange:"1-4",
                    Lat:false, 
                    Favicon:true, 
                    LocalAds:false, 
                    SiteLink:true, 
                    MerchantRating:true, 
                    ImageInAds:false
                }
            }, //Ad Options end
            TemplateOptions:{
                Mobile:{
                    AdUnit:{
                        backgroundColor:"#ABABAB",
                        borderColor:"#ABABAB",
                        lineSpacing:15, // valid values 8-25
                        adSpacing:15, // valid values 5-30
                        font:"Verdana",
                        urlAboveDescription:false,
                        adLayout:1 // or 2/3, show ad in 1 line, 2 lines or 3 lines 
                        cssLink:"partnercsslocaiton.com/mycss.css"
                    },
                    AdUnitLabel:{
                        position:"TopLeft" //"TopRight"/"BottomLeft"/"BottomRight"
                        fontsize:8, // allowed values 6-24
                        color:"#123123" 
                    },
                    Title:{
                        fontsize:14, // valid value 8-18
                        color:"#ABABAB",
                        underline:false,
                        bold:false,
                        onHover:{
                            color:"#BCBCBC",
                            underline:false
                        }
                    },
                    Description:{
                        fontsize:14, // valid value 8-18
                        color:"#ABABAB",
                        underline:false,
                        bold:false,
                        onHover:{
                            color:"#BCBCBC",
                            underline:false
                        }
                    },
                    URL:{
                        fontsize:14, // valid value 8-18
                        color:"#ABABAB",
                        underline:false,
                        bold:false,
                        onHover:{
                            color:"#BCBCBC",
                            underline:false
                        }
                    },
                    LocalAds:{
                        fontsize:14, // valid value 8-18
                        color:"#ABABAB",
                        underline:false,
                        bold:false,
                        onHover:{
                            color:"#BCBCBC",
                            underline:false
                        }
                    },
                    MerchantRating:{
                        fontsize:14, // valid value 8-18
                        color:"#ABABAB",
                        underline:false,
                        bold:false,
                        onHover:{
                            color:"#BCBCBC",
                            underline:false
                        }
                    },
                    SiteLink:{
                        fontsize:14, // valid value 8-18
                        color:"#ABABAB",
                        underline:false,
                        bold:false,
                        onHover:{
                            color:"#BCBCBC",
                            underline:false
                        }
                    },
                    ImageInAds:{
                        align:"left" // or "right", 
                        size:"30x50", // widthxheight, default 20X20 formobile
                        appendToImageSrcUrl:"a=5&b=home"
                    }
                },
                DeskTop:{
                    AdUnit:{
                        backgroundColor:"#ABABAB",
                        borderColor:"#ABABAB",
                        lineSpacing:15, // valid values 8-25)
                        adSpacing:15, // valid values 5-30)
                        font:"Verdana",
                        urlAboveDescription:true, 
                        cssLink:"partnercsslocaiton.com/mycss.css"
                    },
                    AdUnitLabel:{
                        position:"TopLeft", //"TopRight"/"BottomLeft"/"BottomRight"
                        fontSize:8, // allowed values 6-24
                        color:"#123123"
                    },
                    Title:{
                        fontsize:14, // valid value 8-18
                        color:"#ABABAB",
                        underline:false, 
                        bold:false, 
                        onHover:{
                            color:"#BCBCBC",
                            underline:false 
                        }
                    },
                    Description:{
                        fontsize:14, // valid value 8­18
                        color:"#ABABAB",
                        underline:false,
                        bold:false,
                        onHover:{
                            color:"#BCBCBC",
                            underline:false
                        }
                    },
                    URL:{
                        fontsize:14, // valid value 8-18
                        color:"#ABABAB",
                        underline:false, 
                        bold:false,
                        onHover:{
                            color:"#BCBCBC",
                            underline:true 
                        }
                    },
                    ImageInAds:{
                        align:left, //left or right 
                        size:"50x50",//widthXheight, default 50X50 for Desktop
                            appendToImageSrcUrl:"a=5&b=home"
                        }
                    }
                }
            }
        }
    },
    { // This is an example of a second unit. All the options available 
      // to the previous unit are available to this one.
        ypaAdSlotId:"south",
        ypaAdDivId:"ypaAdWrapper-MainSouth",
        ypaAdWidth:"300",
        ypaAdHeight:"100",
        onNoAd:postittoscreen
    }] 
});
 

Further Details on ypaOnNoAd:


When using the ypaOnNoAd parameter, you need to set up a JS function to handle the backfill and then specify that the function should be called by setting it in ypaOnNoAd.

EX:

ypaOnNoAd : <your callback function name>
<script>
function <your callback function name> ( errObj, slotInfo )
{

}
</script>



When there are no ads (no coverage), YPA will call a function specified by the ypaOnNoAd ad tag parameter for the ad slot which did not have ads.

ypaOnNoAd : <Your callback function name>
Two parameters will be passed to your callback function:
1. errObj

  • errObj.URL_UNREGISTERED This is set to 1 only in case of unregistered URL.
  • errObj.NO_COVERAGE This is set to 1 in case of no ad results.

2. slotInfo

  • slotInfo.ypaAdSlotId Name of the ad unit.
  • slotInfo.ypaAdDivId Name of the div associated to the ad unit.
  • slotInfo.ypaAdWidth Width of the ad unit.

Your callback function signature should be the following:

<script>
function <your callback function name> ( errObj, slotInfo )
{

}
</script>

You may specify a different callback function for each unit. If some units return ad results and some do not, then the callback function will only be called for the units for which ad results were not served. 

 

The ypaClickTarget : “<options>” parameter specifies where the linked document will open when the link is clicked. 
The value can be_parent,_blank. ( Default is _blank.)
If no target is specified, the link will open in the current context, unless the user or browser specifies otherwise.

_parent   Opens the link in the parent frame. 
_blank    Opens the linked document in a new tab or window.

EXAMPLE:

ypaAdConfig : "000000005",
ypaAdTypeTag : "typeTag",
ypaAdTrafficType : "test",
ypaClickTarget : “<options>