Portals

Implementation
Welcome to Gameschart for Portals implementation guide. These quick steps will guide you through the installation process for your website. You will require a GamesChart developer account, so if you haven't already got one, please go sign up for free at https://gameschart.com/developer/register/.

Step 1: Create a Portal
In order to use Gameschart for Portals you will have to first create a new "Portal" from your GamesChart developer console. Login to https://gameschart.com/developer/ and select "Add Game" from the menu at the top. Then select "Portal" from the list of platforms. Continue to enter the URL for your portal and you will be given a unique gamekey (Game ID) which is used to track using the code in the next step. Before you embed the code, please "Enable" your portal by clicking the red power icon in your developer console, it will then turn green.

Step 2: Embed the code on your site
Use the code snippet below on your website and include your unique gamekey (Game ID). For most people this will be enough, and that is pretty much all there is to it. Check below for troubleshooting.

 var _gcopt = _gcopt || {}; _gcopt['gamekey'] = 'XXXXXXXX'; _gcopt['object'] = 'auto'; _gcopt['position'] = [10, 10]; (function {   var gc = document.createElement('script');    gc.type = "text/javascript"; gc.async = true;    gc.src = "http://gameschart.com/js/portal.js";    var s = document.getElementsByTagName('script')[0];    s.parentNode.insertBefore(gc, s);  });

Step 3: Celebrate!
You'll then need to play one game on your portal and check that GamesChart icon appears correctly over your games. If you then refresh your "My Games" page you will see a green tick appear on the icon in your developer console next to your portal URL. This informs you that your portal is now fully verified and tracking impressions and clicks.

Troubleshooting
These are the common issues developers may encounter during the integration process. If you have any further issues, please email [mailto:support@gameschart.com support@gameschart.com] with your query and and we will do our best to get back to you within 24hrs.

Nothing seems to be happening?
Sometimes things don't quite work out as expected, so we added a simple debug option. Using the code below will enable the debugger which should help you diagnose any issues you are seeing, and hopefully point you in the right direction for a fix.

_gcopt['debug'] = true;

Could not locate flash object?
By default, the code will attempt to auto-detect the game object on your page. Although this works in most cases, sometimes you will have to specify the ID of your tag. To do this you would simply use the code below.

_gcopt['object'] = '#idofyourembedtag';

If that still doesn't work, please make sure that you are actually using and not tags for your games. Object tags are supported, but the embed inside them must be the ID that is used to target.