Last active
June 15, 2020 16:17
-
-
Save robisatthefunction/de797c010068ce5619cf96c59a13257e to your computer and use it in GitHub Desktop.
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
var url = window.location.href; | |
if (url.indexOf('thank-you') > -1) { | |
var plan = url.split('/')[5]; | |
if (plan == "M") { | |
window["optimizely"] = window["optimizely"] || []; | |
window["optimizely"].push({ | |
type: "user", | |
attributes: { | |
"plan": "monthly" | |
} | |
}); | |
} else if (plan == "Y") { | |
window["optimizely"] = window["optimizely"] || []; | |
window["optimizely"].push({ | |
type: "user", | |
attributes: { | |
"plan": "yearly" | |
} | |
}); | |
} else if (plan == "D") { | |
window["optimizely"] = window["optimizely"] || []; | |
window["optimizely"].push({ | |
type: "user", | |
attributes: { | |
"plan": "D" | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment