Skip to content

Instantly share code, notes, and snippets.

@deverts

deverts/ceros.js Secret

Created February 15, 2018 15:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deverts/88ed8d013e22614b4c0f9e17910df523 to your computer and use it in GitHub Desktop.
Save deverts/88ed8d013e22614b4c0f9e17910df523 to your computer and use it in GitHub Desktop.
<script>
(function() {
require.config({
paths: {
Nudge: "<YOUR NUDGE SCRIPT CODE>",
CerosSDK: "//sdk.ceros.com/standalone-player-sdk-v4.min"
}
});
require(["Nudge", "CerosSDK"], function(_, CerosSDK) {
CerosSDK.findExperience()
.fail(function(error) {
console.error(error);
})
.done(function(experience) {
experience.findComponentsByTag("ndg").subscribe(
CerosSDK.EVENTS.CLICKED, function(component) {
ndg(component.payload);
});
});
});
})();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment