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
// Learn more about destination functions API at | |
// https://segment.com/docs/connections/destinations/destination-functions | |
// Crisp API documentation: https://docs.crisp.chat/api/v1/ | |
// !! Add your website_id here | |
const website_id = '9a2518c0-913f-46e6-acfe-3770cda57186'; | |
var endpoint = | |
'https://api.crisp.chat/v1/website/' + website_id + '/people/profile'; |
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
{ | |
"plugin_type": "analytics_integration", | |
"name": "Usabilla", | |
"form_schema": [], | |
"description": "", | |
"options": { | |
"track_layer_decision": "console.log('4');\n\nfunction userCustomData() {\n ub_window = (document.getElementById('lightningjs-frame-usabilla_live') || {}).contentWindow || {};\n return (ub_window.usabilla_live_settings || {}).local_data\n}\n\nfunction updateUsbl() {\n \n\t// capture Optimizely data\n\tvar campaignInfo = optimizely.get('state').getDecisionObject({'campaignId': campaignId});\n\n\t//retrieve current Usabilla custom variables\n var usbllocaldata = userCustomData();\n var usblCustomVars = usbllocaldata.custom;\n\n //add Optimizely data to custom variable object\n usblCustomVars['Optimizely_' + campaignInfo.experiment] = campaignInfo.variation;\n\n //send updated custom variable object to Usabilla\n window.usabilla_live('data', {\n \t'custom': usblCustomVars\n });\n}\n\n//initiate polling for Usabilla object\n\nvar count = 0;\nvar poll = setInterval(function(){\n |
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
{ | |
"plugin_type": "analytics_integration", | |
"name": "ContentSquare", | |
"form_schema": [ | |
{ | |
"default_value": "1", | |
"field_type": "dropdown", | |
"name": "customVar", | |
"label": "customVar", | |
"options": { |
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
{ | |
"plugin_type": "analytics_integration", | |
"name": "Amplitude Analytics Integration", | |
"form_schema": [ | |
{ | |
"default_value": "[Optimizely] Experiment", | |
"field_type": "text", | |
"name": "property_prefix", | |
"label": "User Property Prefix", | |
"options": null |
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
{ | |
"plugin_type": "analytics_integration", | |
"name": "Amplitude Analytics Integration", | |
"form_schema": [ | |
{ | |
"default_value": "[Optimizely] Experiment", | |
"field_type": "text", | |
"name": "property_prefix", | |
"label": "User Property Prefix", | |
"options": null |
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
// Pre conditions : | |
// 1: Econda-Tracking-Script is loaded before | |
(function(){ | |
var decObject = window.optimizely.get("state").getDecisionObject({campaignId: campaignId}); | |
if( typeof window.emos3 !== 'undefined'){ | |
window.emos3.send({ type: 'event', abtest: [ [decObject.experiment , decObject.variation] ] }); | |
} else if (typeof(window.emosPropertiesEvent)== "function"){ | |
window.emosPropertiesEvent({ type: 'event', abtest: [ [decObject.experiment , decObject.variation] ] }); | |
} else { | |
console.log("Problem: econda A/B Test Tracking is activated but tracking library is not yet loaded. Could not send data to econda."); |
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
/* _optimizely_redirect=http://www.example.com */ | |
var qp_addition = "newSearchWeb=true"; | |
if (window.location.href.indexOf(qp_addition) < 0) { | |
var _optly = {redir: document.createElement("a")}; | |
_optly.redir = {protocol: "https:" == document.location.protocol ? "https://" : "http://", | |
domain: window.location.hostname, | |
entire_url: window.location.href, | |
query: window.location.search | |
}; | |
if (_optly.redir.query.length == 0) { |
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
/* _optimizely_redirect=http://www.example.com */ | |
var toPrepend = "https://www."; | |
var hrefPostWWW = window.location.href.split("//")[1].replace("www.",""); | |
var newHref = toPrepend.concat(hrefPostWWW); | |
window.location.replace(newHref); |
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
/* _optimizely_redirect=http://www.example.com */ | |
var toKeep = "/[TO_KEEP]"; | |
var addition = "/[NEW_ADDITION]"; | |
var _optly = {redir: document.createElement("a")}; | |
_optly.redir = {protocol: "https:" == document.location.protocol ? "https://" : "http://", | |
domain: window.location.hostname, | |
first: window.location.href.split(toKeep)[0], | |
query: window.location.search | |
}; | |
_optly.redir.href = _optly.redir.first + toKeep + addition + _optly.redir.query; |
NewerOlder