- Log in to your Shopify admin.
- On the left side, select Online Store under Sales Channels.
- Choose Themes.
- On your Live template, click Actions and select Edit Code.
- Select your main
*.liquid
Layout. - Add the ProfitWell snippet before the body element and replace
PUBLIC_API_TOKEN_HERE
with your public API token.
<script id="profitwell-js" data-pw-auth="PUBLIC_API_TOKEN_HERE">
/* DO NOT DELETE - this code is used to accept our payments or send data to ProfitWell*/
(function(i,s,o,g,r,a,m){i[o]=i[o]||function(){(i[o].q=i[o].q||[]).push(arguments)};
a=s.createElement(g);m=s.getElementsByTagName(g)[0];a.async=1;a.src=r+'?auth='+
s.getElementById(o+'-js').getAttribute('data-pw-auth');m.parentNode.insertBefore(a,m);
})(window,document,'profitwell','script','https://public.profitwell.com/js/profitwell.js');
{% if customer %}
profitwell('start', { 'user_email': '{{customer.email}}' });
{% else %}
profitwell('start', {});
{% endif %}
</script>