PRODUCT
Follow

Overview

Introduction and Screenshots

The Geolocation Ad Feature allows you to acquire user location data and deliver your targeted HTML5 ads accordingly. You’ll have access to the user’s IP address, city, state, zip code, and much more. Geolocation is a Premium Ad Feature.

The Geolocation Ad Feature uses the premium mmGetLocation service that requires the setup and maintenance of a custom API and a monthly maintenance fee. As an alternative, it is strongly recommended that you use the geolocation data provided in the Geo Data Ad Feature which uses the built in EB.API. It provides most of the same location services without the setup and monthly maintenance fees. Please see the comparison chart below for details. 

   

Demos/Downloads

The following table provides links to the template and demo for the Geodata ad feature.

Template

Sizmek_GeoData_HTML5.zip

Demo

Preview demo

Supported Platforms

Platform

Supported Version

Windows

Internet Explorer 10+, Firefox, Chrome, Safari

Mac

Firefox, Chrome, Safari

iPhone

iOS 8.0 and later

iPad

iOS 8.0 and later

Android

4 and later( including tablets)

Assets

Workspaces Available

The HTML5 Geolocation Ad Feature includes one HTML5 Workspace for an HTML5 Polite Banner working demo. 

Included Workspace Files

      Filename

Description

images/DefaultImage300x600.gif

Sizmek Ad Feature default backup Image and demo background

index.html

Sizmek Ad Feature HTML file.

scripts/geolocation.js

Sizmek Ad Feature Script

scripts/scripts.js>/code>

Sizmek Ad Feature Demo Script

styles/styles.css

 Sizmek Ad Feature Stylesheet

 

Implementing the Ad Feature

How to Add the Geolocation Ad Feature to your Workspace Code

Prerequisite

Before you begin, make sure you have the following resources available:

  • HTML5 Geolocation Ad Feature Files 
  • API URL – Must submit Quickbase request to Custom Dev
Procedure

The following steps illustrate how to add the Geolocation Ad Feature to your creative Workspace.

  1. Add the Geolocation script to the head of your index.html file.

    <script type="text/javascript" src="scripts/geolocation.js"></script>

  1. Instantiate your class and pass two required parameters
    • API URL – This is the URL provided to you by Custom Dev. Contact your Customer Service Rep for more information.
    • Specific Location Type response – Enter response type to receive specific response type instead of full location response object. Optional. Ex. Enter ‘zip’ and receive zip code.
    • Callback Method Name – Enter the name of your Callback method to run when a response is ready.
    • Error Handler Method Name - Enter the name of your error handler in the event the geolocation service does not return a timely response.

    <script type="text/javascript">
        var geo = GEOLocation('mmgetlocation.ashx', '', onGeoResponse, onGeoFailure ); 
    </script>

  1. Add your Callback method and Error Handler Methods

    <script type="text/javascript">
        function onGeoResponse(e) {
    	    var obj = e.data;
        }

        function onGeoFailure(e) {
    	    // do something when service fails
        }
    </script>
 

Geolocation parameters

parameter

Type

Description

_url

String

required – Enter MMLocation API URL. Create a Custom Dev Request and get API URL.

_typ

String

optional – Enter Specific Response type to receive specific location instead of the full response object. Ex. Enter ‘zip’ for zip code.

_callback

Function

required - Enter name of method called when geolocation service response object is successful 

_err

Function

required - Enter name of method called when geolocation service response object has failed or timed out

Setting up the Geolocation Ad Feature in the Sizmek Platform

Sizmek MDX Setup

Archive the Geolocation workspace into ZIP files, preserving the directory structure. You can do this with WinZip, 7Zip, or another archiving program.

  1. Zip and upload the HTML5 Workspace Folder found in the template folder.
  2. Log into the MDX2.0 Platform.
  3. Click on ManageCreative Assets, and upload your Workspace to the appropriate asset folder.
  4. (Optional) Rename the folder.
  5. From the main menu, select Shortcuts > Create New Ad > Create a New Ad.
  6. In the Ad Name field, enter the unique name of your ad.
  7. Choose a format from the format type drop-down.
  8. Choose the HTML5 Workspace Folder you uploaded to platform.
  9. Save

Sizmek Advertising Suite Setup

  1. Zip the HTML5 Workspace Folder found in the template folder.
  2. Log in to the Sizmek Advertising Suite.
  3. Click the Creative menu item > Asset Library, and upload your Workspace to the appropriate asset folder.
  4. (Optional) Rename the folder.
  5. Click Creative > Ads and click New Ad and select Blank Ad.
  6. In the Ad Name field, enter the unique name of your ad.
  7. Choose a format from the Ad Format drop-down.
  8. Under Main Assets select the Workspace folder and default image.
  9. Save

 

Comparison of Geolocation and Geo Data Features

Below is a comparison chart the shows the differences in service coverage when using the Geolocation Ad Feature versus the Geo Data Ad Feature. Both utilize the MMGetLocation service, however, the Geolocation Ad Feature accesses the data directly while the Geo Data Ad Feature uses four data points available upon delivery using the EB.API. See the Geo Data Ad Feature Build Guide for more information.

Geolocation Ad Feature (using Premium mmGetLocation Service)

Geo Data Ad Feature (using limited MMGetLocation Service and EB.API)

Geo Data Ad Feature (using limited MMGetLocation Service, EB.API and Gizmo)

$250/month + DCO Pricing

Free

DCO Pricing

mmGetLocation.IP = '129.67.242.155';

No

No

mmGetLocation.Country = 'gbr';

No

Yes

mmGetLocation.CountryFull = 'united kingdom';

No

Yes

mmGetLocation.Region = 'oxf';

No

Yes

mmGetLocation.City = 'oxford';

No

Yes

mmGetLocation.ConnectionSpeed = 'broadband';

No

No

mmGetLocation.CountryConf = '99';

No

Yes

mmGetLocation.RegionConf = '99';

No

 Yes

mmGetLocation.CityConf = '95';

No

Yes

mmGetLocation.MetroCode = '826045';

No

Yes

mmGetLocation.Latitude = '51.7502';

No

Yes

mmGetLocation.Longitude = '-1.26737';

No

Yes

mmGetLocation.CountryCode = '826';

Yes

Yes

mmGetLocation.RegionCode = '25483';

Yes

Yes

mmGetLocation.CityCode = '11740';

Yes

Yes

mmGetLocation.ContinentCode = '5';

No

Yes

mmGetLocation.TwoLetterCountry = 'uk';

No

Yes

mmGetLocation.AreaCode = '603';

No

Yes

mmGetLocation.Zip = ‘10011’;

Yes

Yes

mmGetLocation.CurrentOffset = '';

No

No

mmGetLocation.InDst = 'y';

No

No

mmGetLocation.LocalTime = new Date('August 07, 2016 8:24:50');

No

No

mmGetLocation.UtcTime = new Date('August 07, 2016 7:24:50');

No

No

mmGetLocation.ZipText = 'ox1 1aa';

No

Yes

mmGetLocation.ZipCountry = 'gbr';

No

Yes

mmGetLocation.Isp = 'oxford university';

No

No

mmGetLocation.Domain = 'ox.ac.uk';

No

No

mmGetLocation.Company = '?';

No

No 

Custom Interactions

None 

Important Notice

Geolocation is a Premium Ad Feature and requires users to submit a Quickbase Custom Projects request. Please ask your Customer Service Rep for more details. When the QB request has been accepted you will receive an API URL needed to complete this Feature.

Imporant: Do not use the preview URL provided in the demo files. This URL WILL NOT work for live campaigns. Additionally, live campaigns are charged $250 per month, plus $0.01 CPM.

Change Log

6 January 2017

  • Update to include error handling
  • Migrated to the Sizmek Advertising Suite.

9 March 2016

  • Updated to use Adkit
  • Updated for secure protocol

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments