Last active
August 29, 2015 14:04
-
-
Save fblundun/8d5a78e725d0a10095bb to your computer and use it in GitHub Desktop.
Structured event with contexts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A structured event corresponding to playing some music with no context attached | |
window.snowplow_name_here('trackStructEvent', 'Mixes', 'Play', 'MRC/fabric-0503-mix', '', '0.0'); | |
// The same unstructured event, with two custom contexts attached - | |
// one regarding the page background and one regarding the user type | |
window.snowplow_name_here('trackStructEvent', 'Mixes', 'Play', 'MRC/fabric-0503-mix', '', '0.0', [ | |
{ | |
schema: "iglu:com.mycompany/page_style/jsonschema/1-0-0", | |
data: { | |
background_color: "white", | |
font_size: 12 | |
} | |
}, | |
{ | |
schema: "iglu:com.mycompany/user_type/jsonschema/1-0-0", | |
data: { | |
type: "tester" | |
} | |
} | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment