How to install the ProfitWell .js Snippet

by Neel Desai

Installation Instructions 

Copy and paste this snippet of javascript on your site, making it available on as many pages of your site as possible (ideally, all of them). If the user is logged in, make sure you pass the user's email to the snippet. The ProfitWell snippet was designed to work asynchronously to not affect page load speed and to gracefully handle any errors to not affect the normal functioning of the page. 

<script type="text/javascript"> (function(i,s,o,g,r,a,m){i['ProfitWellObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m); })(window,document,'script','<a href="" target="_blank" data-saferedirecturl=""></a>','profitwell'); profitwell('auth_token', 'Your-ProfitWell-Auth-Token'); profitwell('user_email', '$REPLACE_WITH_EMAIL_OF_CURRENT_USER'); profitwell('user_id','$the_stripe_user_id_of_the_account')` </script>

How Did We Do?