You are on page 1of 14

MobGold Publisher Integration Guide

Version: 0.1.5

TERMS OF USE

The contents specified herewith in this guide documentation as well as the software and information described in it is fully provisioned under license and may only be used, copied, replicated or referred to in accordance with the terms of such license. MobGold does not assume any liability or responsibility for any error or inaccuracies that may occur from the use of this document. All codes and text in the MobGold Publisher Integration Guide is trademarked under MobGold Ltd. All other product names or trademarks are property of their respective owners.

MobGold Publisher Integration Guide Version 0.1.5

Table of Contents
Introduction ................................................................................................................................................................3 How It Works? ............................................................................................................................................................3 Ad Format ...................................................................................................................................................................4 Specifications ..............................................................................................................................................................5 Return Ad Format in XHTML.......................................................................................................................................6 Sample Text Ad .......................................................................................................................................................6 Sample Banner Ad ..................................................................................................................................................6 Return Ad Format in JSON ..........................................................................................................................................7 Sample JSON ...........................................................................................................................................................7 JSON Field Definitions.............................................................................................................................................7 Return Ad Format in XML ...........................................................................................................................................8 Sample XML ............................................................................................................................................................8 XML Field Definitions ..............................................................................................................................................8 Step By Step How to Setup Publisher Site ..................................................................................................................9 a. b. c. Create a New Site ...........................................................................................................................................9 Copy Install Code ......................................................................................................................................... 11 Paste Install Code ........................................................................................................................................ 12

Using Test Mode ...................................................................................................................................................... 14

Page 2 Copyright 2011 MobGold Ltd. All Rights Reserved. MobGold is a registered trademark of MobGold Ltd.

MobGold Publisher Integration Guide Version 0.1.5

Introduction
Thank you for your interest in the MobGold Publisher Program. This document is designed to guide you with complete technical specifications for integrating your mobile site into MobGold Ad Network. If you have any questions about the implementation process, please contact your Technical Account Manager or send us an email to support@mobgold.com

How It Works?
There are 2 important things in MobGold Publisher Program: 1. Each site created will have a unique site id. With the site id, MobGold able to distinguish each site and to deliver the MOST RELEVANT ad to the site. 2. Each site created will be given install code to be copy and paste into their mobile site. It is very important NOT to alter any install code given. Currently MobGold support the following programming languages: PHP JSP CGI/Perl ASP.Net ASP

MobGold Platform Ecosystem

Page 3 Copyright 2011 MobGold Ltd. All Rights Reserved. MobGold is a registered trademark of MobGold Ltd.

MobGold Publisher Integration Guide Version 0.1.5

Ad Format
There are 2 types of ad that will be displayed on publisher site. Advertisers can upload image ad, text ad or both to support their advertising campaign. MobGold by default will serve image ad if both formats (image ad and text ad) are available. Depending on the user mobile handset, the size of the image ad may vary. MobGold will try to serve the best image ad size that will fit on the user mobile screen. If there is only ad text in the MobGold Network inventory or the user mobile handset does not support image, MobGold will serve text ad.

Image Ad

Text Ad

Image Banner

Image Size (in pixel) 300x50

216x36 168x28 120x20 Image Banner Size

Page 4 Copyright 2011 MobGold Ltd. All Rights Reserved. MobGold is a registered trademark of MobGold Ltd.

MobGold Publisher Integration Guide Version 0.1.5

Specifications
This section will explain all the basic information needed for Publisher to connect to MobGold Ad Server to retrieve ads. There are few required parameters that need to be send to MobGold server as below: HTTP Method HTTP Header Request URL HTTP POST Content-Type: application/x-www-form-urlencoded http://ads.mobgold.com/request.php

Parameters are packed into a HTTP POST body and must be URL encoded: Parameter ua xwp pro xwc ipr ipx ipc ref hos uri acp cha lan pt sm ver test fmt (optional) Description HTTP_USER_AGENT value HTTP_X_WAP_PROFILE value HTTP_PROFILE value HTTP_X_WAP_CLIENTID value REMOTE_ADDR value HTTP_X_FORWARDED_FOR value HTTP_CLIENT_IP value HTTP_REFERER value HTTP_HOST value REQUEST_URI value HTTP_ACCEPT value HTTP_ACCEPT_CHARSET value HTTP_ACCEPT_LANGUAGE value Protocol of your server (either http or https) SiteID assigned during the creation of new site. This can be retrieved by logging into MobGold's Web UI at http://www.mobgold.com Version of the install code used Indicate testing or live mode. Allowable values: 1 test mode 0 live mode (default) Type of the ad return format. Allowable values: xhtml return ad in XHTML format (default) json return ad in JSON format xml return ad in XML format Type of the ad type. Allowable values: 0 Both (default) 1 Text Link 2 Banner Ad

type (optional)

Page 5 Copyright 2011 MobGold Ltd. All Rights Reserved. MobGold is a registered trademark of MobGold Ltd.

MobGold Publisher Integration Guide Version 0.1.5

lan (optional)

Language of the Ad content. Allowable values: EN English ES Spanish ZZ Chinese FR French DE German IT Italian PT Portuguese RU Russian ID Indonesian, JA Japanese AR Arabic TH Thai OT Other

Return Ad Format in XHTML


Sample Text Ad
<a href="http://c17.mobgold.com/c.php?ec=dXtKPnX%2Ka6Gq2rRXnc%3D">Latest MP3 Download Here</a>

Sample Banner Ad
<a href="http://c17.mobgold.com/c.php?ec=dXtKPnX%2Ka6Gq2rRXnc%3D"><img alt="Latest MP3 Download Here" src="http://img1.mobgold.com/269f0eeebe8f759c-xl.png" /></a><br/><a href="http://c17.mobgold.com/c.php?ec=dXtKPnX%2Ka6Gq2rRXnc%3D">Latest MP3 Download Here</a>

Page 6 Copyright 2011 MobGold Ltd. All Rights Reserved. MobGold is a registered trademark of MobGold Ltd.

MobGold Publisher Integration Guide Version 0.1.5

Return Ad Format in JSON


Sample JSON
{"text":"Latest MP3 Download Here","icon_ad":"","icon_app":"","link":"http:\/\/c17.mobgold.com\/c.php?ec=dXtKPnX%2Ka6Gq2rR Xnc%3D","banner":" http:\/\/img1.mobgold.com\/269f0eeebe8f759c-xl.png ","adtype":1,"ad_by":"Ad by MobGold"}

Note: Use JSON decode function to read the return value.

JSON Field Definitions


Field Name text icon_ad icon_app link banner adtype ad_by Description Text Ad to display Icon customize for the ad (optional) Icon for type of the application (optional) Click URL to Advertiser page Location of the banner ad 1 - Text Ad, 2 - Banner Ad Default promotion from MobGold (optional)

Page 7 Copyright 2011 MobGold Ltd. All Rights Reserved. MobGold is a registered trademark of MobGold Ltd.

MobGold Publisher Integration Guide Version 0.1.5

Return Ad Format in XML


Sample XML
<?xml version="1.0" encoding="UTF-8"?> <ad> <text>Latest MP3 Download Here</text> <icon_ad></icon_ad> <icon_app></icon_app> <link>http://c17.mobgold.com/c.php?ec=dXtKPnX%2Ka6Gq2rRXnc%3D</link> <banner>http://img1.mobgold.com/269f0eeebe8f759c-xl.png</banner> <adtype>2</adtype> <ad_by>Ad by MobGold</ad_by> </ad>

XML Field Definitions


Field Name text icon_ad icon_app link banner adtype ad_by Description Text Ad to display Icon customize for the ad (optional) Icon for type of the application (optional) Click URL to Advertiser page Location of the banner ad 1 - Text Ad, 2 - Banner Ad Default promotion from MobGold (optional)

Page 8 Copyright 2011 MobGold Ltd. All Rights Reserved. MobGold is a registered trademark of MobGold Ltd.

MobGold Publisher Integration Guide Version 0.1.5

Step By Step How to Setup Publisher Site


This section will show you how to setup your publisher site to request ads from MobGold. The following steps will use PHP install code as example.

a. Create a New Site


1. You must have an active MobGold account in order to create a new site. Login to your MobGold account at http://www.mobgold.com and click on My Sites tab. Next click on Add Mobile Site / App.

Click to create new site

Page 9 Copyright 2011 MobGold Ltd. All Rights Reserved. MobGold is a registered trademark of MobGold Ltd.

MobGold Publisher Integration Guide Version 0.1.5

2. Create a new mobile site. Fill in your site detail like site name, site URL, channel and site description. After you have completed this step, you will see install code on next screen.

Page 10 Copyright 2011 MobGold Ltd. All Rights Reserved. MobGold is a registered trademark of MobGold Ltd.

MobGold Publisher Integration Guide Version 0.1.5

b. Copy Install Code


1. In this page, you will see various install code for each programming language. Click on the programming language that you preferred on your site. Clicking on the text area will auto select the install code. Copy the install code by Ctrl+C or right click mouse and select Copy.

Click and copy all the install code

Notes: It is very important NOT to alter any install code provided as it will result in ad not showing up in your site.

2. Please paste the install code into your site. Reload your page to send your first ad request to complete the integration process with MobGold. Only site that has completed the integration process will able to display live ads from MobGold. 3. It is very important to make sure the site URL you submitted to MobGold actually match with the site URL that you paste the install code.

Page 11 Copyright 2011 MobGold Ltd. All Rights Reserved. MobGold is a registered trademark of MobGold Ltd.

MobGold Publisher Integration Guide Version 0.1.5

c. Paste Install Code


1. Open your text editor and locate which page/section you would like to display the ads.

Paste the install code anywhere in your script where you want to show the ad

2. Paste the install code.

Page 12 Copyright 2011 MobGold Ltd. All Rights Reserved. MobGold is a registered trademark of MobGold Ltd.

MobGold Publisher Integration Guide Version 0.1.5

3. Reload the page to start requesting live ads from MobGold. It may take few minutes before any live ads start to show up at your site.

4. Congratulations. You have just setup your site to serve MobGold ads.

Page 13 Copyright 2011 MobGold Ltd. All Rights Reserved. MobGold is a registered trademark of MobGold Ltd.

MobGold Publisher Integration Guide Version 0.1.5

Using Test Mode


1. In case you have problem showing live ads, please change to test mode. 2. You will need to change the parameter $test_mode = 1 in the install code as shown below.

Set 1 to show test ads

3. Reload the page and you should see test ad as shown below.

4. By clicking on the test ad, you will redirect to MobGold default mobile site. This is normal for testing environment. 5. If you able to see test ad, you should be able to see live ad now.

Page 14 Copyright 2011 MobGold Ltd. All Rights Reserved. MobGold is a registered trademark of MobGold Ltd.

You might also like