Skip to content

Instantly share code, notes, and snippets.

@dangrossman
Last active December 11, 2015 16:39
Show Gist options
  • Save dangrossman/4629451 to your computer and use it in GitHub Desktop.
Save dangrossman/4629451 to your computer and use it in GitHub Desktop.
Sample code for a customer
<script type="text/javascript" src="https://hyvassistant.iljmp.com/improvely.js"></script>
<script type="text/javascript">
improvely.init('hyvassistant', 1);
var regexS = "[\\?&]email=([^&#]*)";
var regex = new RegExp(regexS);
var results = regex.exec(window.location.search);
var email = '';
if (results != null) {
email = decodeURIComponent(results[1].replace(/\+/g, " "));
improvely.label(email);
}
improvely.goal({
type: 'Webinar Signup',
amount: 0,
reference: email
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment