
Integration with OpenX
Introduction #
OpenX is a free, open source ad server that manages the selling and delivery of your online advertising inventory. It would be great to integrate OpenX in Liferay portal. This document will show how to integrate OpenX with Liferay portal.
OpenX http://www.openx.org/
Real Demo (Including plugin and Source Code) http://liferay.cignex.com/ad_server/
Summary http://www.liferay.com/web/jonasxyuan/blog/-/blogs/full-restful-integration-of-liferay-and-openx
Concepts #
An advertiser is the owner of the advertising you display on a website. Advertisers run campaigns containing banners. You must create an advertiser before you can set up a campaign and add banners to it.
Campaigns are always owned by advertisers and you must create an advertiser before defining a campaign. A campaign contains a number of banners which can share delivery settings or have different delivery settings for each banner. Use the delivery settings to control the frequency and duration of ad delivery, the ad priority and to limit the display of ads based on a variety of parameters.
A banner is any creative content that is displayed as an ad. Banners can be in many file formats, including .gif, .jpg, .png, .swf (Flash), JavaScript, text and HTML. To display banners, link banners to zones on your website(s).
Zones are spaces on your website used for displaying advertisements. A zone can be a single space on a specific page or a space which is used on multiple pages which shows the same collection of banners. Zones are part of website. You must create a website before you can define any zones for it.
Web Site: OpenX is used to manage advertising on websites. A website owner defines areas (zones) on a website that are reserved for displaying advertising.
Channels are a convenient way of defining different content sections of a website and applying a separate set of delivery limitations for each channel. Channels are useful when advertisers want to target specific visitor interests, for example entertainment or sport.
Banners#
OpenX delivers three types of banner:
• Image banners (stored locally or externally)
• HTML banners
• Text banners
Image banners#
Image refers to a variety of file types. The following table lists the formats that OpenX supports.
Media File formats
Image .jpg, .jpeg, .gif, .png
Flash movie .swf
Quicktime movie .mov
Real Media movie .rpm
You can serve these ads:
• directly from the OpenX database using the Local banner (SQL) option
• with a web server stored on the same machine as OpenX using the Local banner (web server) option
• with a web server stored on a separate machine using the External banner option
Select the appropriate server option when you add a banner to the system.
HTML banners#
You can enter HTML code for banners such as plain text ads, forms or banners with multiple images. You can also use HTML code from external ad networks such as Google AdSense.
Text ads#
Text ads are similar in style to Google Sponsored Links.
Requirements - Size
Square: 300x250 Skyscraper: 120x600 Button 1: 125x125 Button 2: 120x60 Banner 1: 468x60 Banner 2: 222x90
File Type: swf, gif, png, jpg, jpeg
File Size: less than 35k
Solutions #
Ad Services#
Metadata - Banners for search by keyword and advanced search
URL:
Search by Keyword
http://docs.cignex.com/ad_services/services?action=search
Advanced Search
http://docs.cignex.com/ad_services/services?action=advancedSearch&filename=gif
contenttype=storagetype= autohtml= alt_contenttype=
filename imageurl htmltemplate htmlcache target url alt status bannertext description adserver compiledlimitation acl_plugins append alt_filename alt_imageurl comments keyword parameters }}}
Search Data - Results#
<root> <item> <uid>5</uid> <download_url> http://docs.cignex.com/ad_services/services?action=download&uid=5 </download_url> <filename>gameplayer.gif</filename> <contenttype>gif</contenttype> <size>54x95</size> <track_url> http://docs.cignex.com/ad_services/services?action=tracker&uid=5&url=http://liferay.cignex.com&source= </track_url> </item> </root>
Report data#
URL: http://docs.cignex.com/ad_services/services?action=report&uid=2
http://docs.cignex.com/ad_services/services?action=report
<root> <item> <report_id>6</report_id> <banner_uid>5</banner_uid> <filename>gameplayer.gif</filename> <contenttype>gif</contenttype> <size>54x95</size> <source_url>http://liferay.cignex.com</source_url> <created_at>2008-04-29 21:52:13.0</created_at> </item> </root>
Advanced Search#
http://docs.cignex.com/ad_services/services?action=reportAdvancedSearch&ad_content_type=gif&ad_width=120&
ad_id = ad_content_type = ad_file_name ad_width= ad_height= source_url target_url target_user
Date & Time Search
????
Thumbnail#
Download Thumbnail Images
http://docs.cignex.com/ad_services/services?action=download&uid=5
Reference#
Use
<track_url> and <download_url><p> <a href="http://docs.cignex.com/ad_services/services?action=tracker&uid=9&url=http://liferay.cignex.com&source=http://www.cignex.com"> <img alt="" src="http://docs.cignex.com/ad_services/services?action=download&uid=9" /></a> </p> <p>This is in collaboration with walmart</p> }}}
Setup#
Portlets set up#
Download WAR: http://liferay.cignex.com/ad_server/ad-portlet-5.1.2.1.war
Download WAR: http://liferay.cignex.com/ad_server/ad-portlet-5.3.0.1.war
Download Source Code: http://liferay.cignex.com/ad_server/ad-portlet-src.zip
And deploy it to the Portal.
OpenX Server and Integrating Services setup#
Install OpenX in the server with port: 81. And it has to use MySQL database, since the integrating service (ad_services) only supports MySQL.
Database name /user name / password: openx/openx/openx is configurable. If different database name /user name / password are used, configure same information in integrating service.
Integrating service (ad_services) with Tomcat must be installed in the same box with OpenX server. For example, it is using port 80 with same domain (of OpenX) docs.cignex.com.
Just drop ad_services.war to the folder $TOMCAT_DIR/webapps.
Download WAR: http://liferay.cignex.com/ad_server/ad_services.war