Skip to content

Instantly share code, notes, and snippets.

@sperand-io
Last active October 30, 2015 17: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 sperand-io/faf5ce445a272c132b11 to your computer and use it in GitHub Desktop.
Save sperand-io/faf5ce445a272c132b11 to your computer and use it in GitHub Desktop.
Wootric -> Segment
analytics.ready(function() {
window.wootricSetttings.survey_callback = function survey_callback() {
analytics.identify({ last_wootric_surveyed_at: Math.round((testDate.getTime())/1000) });
};
window.wootricSetttings.decline_callback = function decline_callback() {
analytics.identify({ last_wootric_declined_at : Math.round((testDate.getTime())/1000) });
};
window.wootricSetttings.response_callback = function response_submitted_callback(score, comment) {
analytics.identify({
last_wootric_score : parseInt(score),
last_wootric_comment: decodeURIComponent(comment).slice(0,255))
});
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment