This file contains 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
function getReferrerSource(referrer) { | |
var source = null; | |
if (referrer && referrer.indexOf("swapcard.com") === -1) { | |
if (referrer.indexOf("google") !== -1) { | |
source = "Google Organic Search"; | |
} else if (referrer.indexOf("bing") !== -1) { | |
source = "Microsoft Organic Search"; | |
} else if (referrer.indexOf("yahoo") !== -1) { | |
source = "Yahoo Organic"; | |
} else if (referrer.indexOf("twitter") !== -1) { |
This file contains 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
const jsforce = require("jsforce"); | |
const Zoho = require("zoho"); | |
const lodash = require("lodash"); | |
const bluebird = require("bluebird"); | |
const rp = require('request-promise'); | |
const sf = new jsforce.Connection({ | |
loginUrl: "https://login.salesforce.com", | |
}); |