Due to the fact that all settings of your IM application are part of the implementation script, it is very easy to target ads towards your user. For example: if you want to show women, who are older than 25 a different banner, than all of the other users, your script could look like this:
Example to set the javascript variable my_banner_code to “25+ woman” if the users is a woman older than 25 (for the rest: my_banner_code=“all other users”):
<script type="text/javascript"> <?php if ( ($user->age > 25) && ($user->gender=="w") ) { echo 'var my_banner_code="25+ woman";'; } else { echo 'var my_banner_code="all other users";'; } ?> </script>
Pass banner code (my_banner_code) to the implemenation code:
<script type="text/javascript"> var TOKSTA_CONFIG = { app_id: "your-application-id", user_id: "the-user-id", user_hash: "the-user-hash", user_data: "the-user-data", generated: "current-unix-timestamp", //adjustments needed show_banner:true, banner_code: my_banner_code }; </script> <script src="http://embed.toksta.com/embed/toksta.js" type="text/javascript"></script>