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
(function(win) { | |
'use strict'; | |
var listeners = [], | |
doc = win.document, | |
MutationObserver = win.MutationObserver || win.WebKitMutationObserver, | |
observer; | |
function waitForElement(selector, repeat, fn) { | |
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
/* Place this code in Project JS. | |
* This code randomly selects either one experiment marked with an [ME], one experiment from each group denominated with [Group_A] where A is any character the user wishes to use. The code is evaluated before url targeting and audiencing. | |
* | |
* The way it works is: | |
* - Let's say we have 3 groups with 3 experiments in each group, 3 experiments marked with an [ME], and 5 experiments not marked with a [Group_X] or an [ME]. | |
* [Group_A_ME] Exp 1, [Group_A_ME] Exp 2, [Group_A] Exp 3, [Group_A] holdout | |
* [Group_B] Exp 4, [Group_B] Exp 5, [Group_B] Exp 6, [Group_B] holdout | |
* [Group_C] Exp 7, [Group_C_ME] Exp 8, [Group_C] Exp 9, [Group_C] holdout | |
* [ME] Exp 10, [ME] Exp 11, [ME] Exp 12, [ME] holdout | |
* |
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
<script type="text/javascript"> | |
function getOptimizelyTestMap(e) { | |
if ("undefined" != typeof window["optimizely"]) { | |
var allTests = window["optimizely"].allExperiments | |
, charCount = 0 | |
, siteCatalyst = s_gi(s_account) | |
, variationMap = window["optimizely"].variationMap | |
, variationMapActive = [] // Leave behind only tests that are still running | |
; | |
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
/* Place this code in Project JS. | |
* This code randomly selects either one experiment marked with an [ME], one experiment from each group denominated with [Group_A] where A is any character the user wishes to use. The code is evaluated before url targeting and audiencing. | |
* | |
* The way it works is: | |
* - Let's say we have 3 groups with 3 experiments in each group, 3 experiments marked with an [ME], and 5 experiments not marked with a [Group_X] or an [ME]. | |
* [Group_A] Exp 1, [Group_A] Exp 2, [Group_A] Exp 3, [Group_A] holdout | |
* [Group_B] Exp 4, [Group_B] Exp 5, [Group_B] Exp 6, [Group_B] holdout | |
* [Group_C] Exp 7, [Group_C] Exp 8, [Group_C] Exp 9, [Group_C] holdout | |
* [ME] Exp 10, [ME] Exp 11, [ME] Exp 12, [ME] holdout | |
* |
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
// if logic to prevent experiment from running on itself in the editor. | |
if (window.location.search.match(/\d/g).join("") !== 5450482367) { | |
(function() { | |
'use strict'; | |
var experiment_id = window.location.search.match(/\d/g).join(""); | |
var current_timestamp; | |
var next_timestamp; | |
var _$; | |
// Wait for jQuery to be enabled on the page. |
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
{ | |
"plugin_id": "exit_intent", | |
"plugin_type": "widget", | |
"name": "Exit Intent Popup", | |
"edit_page_url": "http://www.atticandbutton.us", | |
"form_schema": [ | |
{ | |
"default_value": "Don't go!", | |
"field_type": "text", | |
"name": "headline", |
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
window['optimizely'] = window['optimizely'] || []; | |
if (window.jQuery("meta[name='section']").length > 0) { | |
window['optimizely'].push({ | |
type: "page", | |
pageName: "section_page", | |
tags: { | |
category: window.jQuery("meta[name='section']").attr('content'), | |
type: window.jQuery("meta[property='og:type']").attr('content') === 'website' ? 'section_front' : window.jQuery("meta[property='og:type']").attr('content'), | |
title: window.jQuery("meta[property='og:title']").attr('content') | |
} |
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
## Matt Moravec contributions week ending Feb 4, 2018 | |
### CoZ Devcon | |
* Setup and hosted CoZ event pre-devcon @ABV | |
* Helped host hackathon @Github Offices | |
### Hackernoon | |
* Published an article helping developers in Silicon Valley learn about NEO and awesome CoZ projects https://hackernoon.com/get-a-sneak-peek-at-neo-devcon-with-thor-tokens-cto-matt-moravec-f00d75bbff2d |
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
function* getToken(action) { | |
const params = { | |
method: 'POST', | |
mode: 'cors', | |
body: JSON.stringify({ | |
merchantIdScanReference: 'YOURSCANREFERENCE1', | |
successUrl: 'https://www.your-site.com/sucess', | |
errorUrl: 'https://www.your-site.com/error', | |
}), | |
headers: new Headers({ |
OlderNewer