Skip to content

Instantly share code, notes, and snippets.

@markmarkoh
Created May 5, 2010 12:22
Show Gist options
  • Select an option

  • Save markmarkoh/390704 to your computer and use it in GitHub Desktop.

Select an option

Save markmarkoh/390704 to your computer and use it in GitHub Desktop.
<!-- Remember to replace the group and test tokens -->
<script type="text/javascript">
document.write(unescape("%3Cscript src='http://press9formoreoptions.com/static/p9.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var p9 = P9fmo("your_group_token");
var visit_id = "p9_visits";
var visit_goal = 3;
var visits = p9.getCookie(visit_id);
if (visits) {
if(visits.length == (visit_goal - 1 ) ){
p9.goal("your_test_token");
p9.setCookie(visit_id, visits + "Y", 360);
} else if (visits.length < (visit_goal - 1) ) {
p9.setCookie(visit_id, visits + "Y", 360);
}
} else {
p9.setCookie(visit_id, "Y", 360);
}
} catch(e) {;}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment