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
webengage.survey.onSubmit(function(data) { | |
swLog.debug("Submitted Survey: " + data); | |
// send data to marketo | |
try { | |
var marketoData = { | |
NPS_Score__c: _.get(_.find(data.questionResponses, { value: { "@class": "score" } }), "value.value"), | |
NPS_Survey_Date__c: new Date().toISOString(), | |
NPS_Additional_Details__c: _.get(_.find(data.questionResponses, { value: { "@class": "text" } }), "value.text") | |
}; |
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
[ | |
{ | |
"questionId": "1hrrlb4", | |
"questionText": "How likely is it that you would recommend SimilarWeb to a friend or colleague?", | |
"order": 1, | |
"value": { | |
"@class": "score", | |
"value": 8 | |
} | |
}, |
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
[ | |
{ | |
"questionId": "1hrrlb4", | |
"questionText": "How likely is it that you would recommend SimilarWeb to a friend or colleague?", | |
"order": 1, | |
"value": { | |
"@class": "score", | |
"value": 7 | |
} | |
}, |
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
#!/bin/bash | |
# Prefer US English and use UTF-8 | |
export LC_ALL="en_US.UTF-8" | |
export LANG="en_US" | |
# Detect which `ls` flavor is in use | |
if ls --color > /dev/null 2>&1; then # GNU `ls` | |
colorflag="--color" | |
else # OS X `ls` |
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
// Load the application once the DOM is ready, using `jQuery.ready`: | |
$(function(){ | |
// EventBus | |
var dispatcher = _.clone(Backbone.Events); | |
//use Mustache.js Template syntax | |
_.templateSettings = { | |
interpolate : /\{\{(.+?)\}\}/g | |
}; |
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
---------- Forwarded message ---------- | |
From: Mark S. Miller <erights@google.com> | |
Date: Tue, Nov 16, 2010 at 3:44 PM | |
Subject: "Future of Javascript" doc from our internal "JavaScript Summit" | |
last week | |
To: javascript-standard@google.com | |
On November 10th and 11th, a number of Google teams representing a variety | |
of viewpoints on client-side languages met to agree on a common vision for | |
the future of Javascript. |