Navegg's API
Navegg's system was built to allow its users to capitalize, real-time, on your website visitors demographic profiles. Having that data, you can use it to costumize your site's content or simply use them with a 3rd party system like AdManager or OpenX. Feel free - it's your information!
Our code
Your page's code should have Navegg's line on its body:
<script type="text/javascript" id="navegg" src="http://lt.navegg.com/lt.js?XXXXX"></script>
XXXXX is you partner ID, which we provide on signup.
Remember: if you to plan to use dynamically you visitor profile, don't forget to include the snippet code before other JavaScript requests.
Using our API
Let's say you want to welcome women that visit your site in a special way. Place the following code on your HTML after the basic snippet code.
<script type="text/javascript">
nvg_gender = ltgc('navegg_gender');
if (nvg_gender == 'F')
{
alert ('Hi there, we've detected that you are a woman.');
}
</script>
Please note the ltgc() function. We use it to request the demographic data of your current visitor. You can use the following requests: navegg_gender, navegg_age, navegg_education, navegg_interests, navegg_city, navegg_region and navegg_country:
<script type="text/javascript">
nvg_gender = ltgc('navegg_gender'); // Gender //
nvg_age = ltgc('navegg_age'); // Age //
nvg_education = ltgc('navegg_education'); // Education //
nvg_interests = ltgc('navegg_interests'); // Topics of interest //
nvg_city = ltgc('navegg_city'); // City //
nvg_region = ltgc('navegg_region'); // Region //
nvg_country = ltgc('navegg_country'); // Country //
</script>
Mashup with 3rd parties
With the ltgc() request it's plain simple feeding demographic data to any JavaScript enabled system.
Google Analytics
Want your Analytics account to include Navegg's data? Just replace the traditional Google Analytics code by this one.
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ?
"https://ssl." :
"http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
nvg_gender = ltgc('navegg_gender');
nvg_age = ltgc('navegg_age');
nvg_education = ltgc('navegg_education');
nvg_topics = ltgc('navegg_interests');
var cookieTracker = _gat._getTracker("UA-INVALID_COOKIE_TRACKING");
cookieTracker._setVar('/age:'+nvg_age+'/gender:'+nvg_gender+'/education:'+nvg_education+'/topics:'+nvg_topics+'/');
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-XXXXXX-X");
pageTracker._initData();
pageTracker._trackPageview();
} catch(err) {}
</script>
The new code will add to Google Analytics reports, gender, age, education and interests data. It's wise to remember that the new analytics code should be inserted after the basic Navegg code and you should replace UA-XXXXX-X by your Google Analytics tag number.
Login your Google Analytics account and find the Advanced Segments option.

Create a new custom segment - top right corner:

Find the option Dimensions. Drag the square User defined value to the box Dimension or metric. Next, changed the combo box Condition to "Contains" and type on the Value field the desired filter. On the example below, we used the /education:Superior/ to filter undergraduate users that had visited this site:

Name your demographic or interest atribute and save it:

You can now use your demographic data alongside traditional Analytics reports. Just click Advanced Segments on the top-right corner of your dashboard and select the different demographics you want to use.
That's it! You should now see your Analytics reports with demographic and/or interest data. You can now get valuable insights using a mashup of site audience and visitor profiles.

OAS RealMedia
OAS RealMedia is a well known publisher tool to deliver ad campaigns. You can use Navegg's API to improve campaign targetting in multiple ways. A possible solution is creating targeted site and page delivery information.
Simply add to the OAS JavaScript code, right after defining OAS_sitepage variable value, this additional snippet:
nvg_gender = ltgc('navegg_gender');
nvg_age = ltgc('navegg_age');
OAS_sitepage += '/gender_'+nvg_gender+'/age_'+nvg_age;
On the above example we targetted specific gender and age, but you can use any demographic data available. After setting up your site, also remember to target your campaing (page and site) accordingly.
