Created
August 19, 2011 09:51
-
-
Save kevinansfield/1156482 to your computer and use it in GitHub Desktop.
Assistly Performable reg-widget call
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
// get value of query parameter | |
// taken from http://stackoverflow.com/questions/2090551/parse-query-string-in-javascript | |
function getQueryVariable(variable) { | |
var query = window.location.search.substring(1); | |
var vars = query.split("&"); | |
for (var i = 0; i < vars.length; i++) { | |
var pair = vars[i].split("="); | |
if (pair[0] == variable) { | |
return pair[1]; | |
} | |
} | |
} | |
if (typeof(getQueryVariable('gs_company_name')) != "undefined"){ | |
var companyName = getQueryVariable('gs_company_name').substring(0,126); | |
}else{ | |
var companyName = $.assistlyGACookie('keywords'); | |
} | |
$(document).assistlySignup({ | |
performable: true, | |
prepStep: ["name", "email"], | |
mainStep: ["password", "subdomain"], | |
sourceOne: 'GARY-TEST', | |
sourceTwo: companyName, | |
sourceThree: $.assistlyGACookie('source') + '/' + $.assistlyGACookie('medium'), | |
sourceFour: window.location.href.substring(0,126), | |
sourceFive: document.referrer.substring(0,126) | |
}); | |
var _paq = _paq || []; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment