Skip to content

Instantly share code, notes, and snippets.

@BrandesEric
Created July 9, 2014 03:40
Show Gist options
  • Save BrandesEric/36c2cffa6e032c37e7b6 to your computer and use it in GitHub Desktop.
Save BrandesEric/36c2cffa6e032c37e7b6 to your computer and use it in GitHub Desktop.
Meteor + TrackJS
// This thing lives at /client/lib/compatibility
(function (){
window._trackJs = {
token: "mytoken"
};
// the entire tracker script here
})()
<head>
<title>trackjs-test</title>
</head>
<body>
{{> hello}}
</body>
<template name="hello">
<h1>TrackJS Test</h1>
<input type="text" value="" />
</template>
if (Meteor.isClient) {
Template.hello.greeting = function () {
return "Welcome to trackjs-test.";
};
Template.hello.events({
'keyup input[type="text"]' : function (){
console.log("keyup");
}
});
}
if (Meteor.isServer) {
Meteor.startup(function () {
// code to run on server at startup
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment