Skip to content

Instantly share code, notes, and snippets.

@boertel
Last active December 20, 2015 18:59
Show Gist options
  • Save boertel/6179629 to your computer and use it in GitHub Desktop.
Save boertel/6179629 to your computer and use it in GitHub Desktop.
Get Satisfaction Integration
<script type="text/javascript" charset="utf-8">
window.ptReady = window.ptReady || [];
window.ptReady.push(function () {
PT.event.bind("getsatisfaction.topic.reply", function () {
_ptq.push(["reply", {points: 25}]);
});
PT.event.bind("getsatisfaction.topic.question", function () {
_ptq.push(["ask", {points: 25}]);
});
PT.event.bind("getsatisfaction.topic.idea", function () {
_ptq.push(["submit", {points: 10}]);
});
PT.event.bind("getsatisfaction.topic.praise", function () {
PT.platform.getsatisfaction.topic(function (topic) {
_ptq.push(["review", {points: 10, ref_id: "getsatisfaction-" + topic.id}]);
});
});
PT.event.bind("getsatisfaction.user.signup", function (getsatisfaction_user) {
_ptq.push(["signup", {points: 500, ref_id: "getsatisfaction-" + getsatisfaction_user.id}]);
});
PT.platform.getsatisfaction.init();
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment