Skip to content

Instantly share code, notes, and snippets.

@Lavos
Last active December 18, 2015 22:29
Show Gist options
  • Save Lavos/5855260 to your computer and use it in GitHub Desktop.
Save Lavos/5855260 to your computer and use it in GitHub Desktop.
Clarity example of dynamic ad insertion
<script type="text/javascript">
CLARITY.push({
use: ['jquery', 'ads'],
run: function($, Ads){
Ads.site_code = 'buz.pitnb';
Ads.zone = 'homepage';
Ads.keywords = [];
$('body').click(function(){
var div = document.createElement('div');
document.body.appendChild(div);
Ads.createAd({
sizes: [300, 250],
position: '300a',
element: div
});
});
}
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment