Banner Javascript Guide

1 minute read

Minah Kim

The current version is 105.

Sample Project

Bitbucket
git clone https://mezzomedia_adtech@bitbucket.org/mezzomediaadtech/javascript.git

Operating environment for script

Adding jQuery

The MANPLUSY ad script works in a JQuery setting environment.
If the page where you want to apply the ad does not have a JQuery script, insert the tag below.

<script type="text/javascript" src=" http://advimg.ad-mapps.com/sdk/M_PLUS/JS/common/jquery-1.11.3.min.js"></script>

Adding script

Add ad script for running MANPLUS banner ad.
( Use the code below to conveniently perform an internal update.)

<script type="text/javascript" src=" http://advimg.ad-mapps.com/sdk/M_PLUS/JS/ad/mezzo_SignalPlay_ad.js"></script>

Set ad options

Option

Option Definition Default Required Value
ssl request url calling method false Y false : http
true : https
adTarget DIV ID to draw banner   Y  
adDepth Set the z-index value of the banner 999999 Y  
publisherCD Change the Publisher_Code issued. null Y Publisher Code issued
mediaCD Change the Media code issued. null Y Media Code issued
sectionCD Change the Section code issued. null Y Section Code issued
linkTarget New window on click 1 Y 0 : Move page
1: New window

Configuring an ad page

Source code sample

<body>
	<div id="banner_test" >
	<!-- AD Area -->	
	</div>
 
	<script type="text/javascript" charset='utf-8'> 
		
		// 1)
		function adStart(top, left, adValue){
		
		// 2)
		var ad = new SignalAD();
		
		// 3)
		ad.setting({
			ssl : false, 		
			adTarget : adValue, 			
			adDepth : "999999",				
			publisherCD : "Publisher Code", 
			mediaCD : "Media Code", 		
			sectionCD : "Section Code",      
			linkTarget : "1"                
		},
		{
			done : function( status, msg ) {
				console.log("[event] done : "+status+" msg :"+msg);
			},
			fail : function( status, msg ) {
				console.log("[event] fail : "+status+" msg : "+msg);
			},
			adclick : function( status, msg ) {
				console.log("[event] adclick : ( status "+status+" msg : "+msg+" )");
			},
			etc : function( status, msg ) {
				console.log("[event] fail - status : "+status+" msg : "+msg);
			},
			noad : function( status, msg ) {
				console.log("[event] noad - status : "+status+" msg : "+msg);
			},
			close : function( status, msg ) {
				console.log("[event] close - status : "+status+" msg : "+msg);
			},
			chargeable : function( status, msg ) {
				console.log("[event] at type - status : "+status+" msg : "+msg);
			}
		}); 

			// 4)
			ad.start(); 
		}

		adStart('0px', '0px', 'banner_test');

	</script>
</body>

Source code description

  1. Insert the DIV tag in the location where you want the ad to be exposed.
  2. Declares and creates a Developer Center ad object.
  3. Make default settings to run ads.
  4. The section that connects the exposure of an ad by connecting the area of DIV ID.

Callback description

Callback Definition
done This is a callback function that is called if an ad is run normally.
fail A callback function that is called in case an ad receipt fails.
adclick A callback function that is called when an ad is clicked.
etc The part of the callback call for other events in the event of an etc.
noad This is a Noad event for which all commercial advertising volumes are exhausted and returned in the MANPLUS ad server.
close Close event in front ad.
chargeable This is an event for chargeable form.

Example

Sample

Download

Updated: