Skip to content

Instantly share code, notes, and snippets.

@buritica
Last active August 29, 2015 14:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save buritica/07a55eb225f268f668e8 to your computer and use it in GitHub Desktop.
Save buritica/07a55eb225f268f668e8 to your computer and use it in GitHub Desktop.
Glossy JSON Spec
<script>
var namespace = 'onswipe';
var message = JSON.stringify({
view_url: '%%VIEW_URL_UNESC%%',
click_url: '%%CLICK_URL_UNESC%%%%DEST_URL%%',
cachebuster: '%%CACHEBUSTER%%',
glossy_id: 'my_id',
type: 'glossy',
pixels: []
});
window.top.postMessage(namespace + '/' + message, '*');
</script>
@buritica
Copy link
Author

As you can see, the new updated version includes a namespace, that is the only difference with v0.1 of glossy JSON

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment