Installing the ProfitWell in-app snippet on Shopify

  1. Login to your Shopify admin
  2. On the left side, select Online Store under Sales Channels
  3. Choose Themes
  4. On your Live template, click Actions and select Edit Code
  5. Select your main *.liquidLayout
  6. Add the following 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">
(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>

Referrer Policy

The Referrer-Policy HTTP header controls how much referrer information (sent via the Referrer header) should be included with requests. Aside from the HTTP header, you can set this policy in HTML.

For the ProfitWell snippet to work correctly, you must set the referrer policy to strict-origin.

You can set referrer policies inside HTML. For example, you can set the referrer policy for the entire document with a <meta> element with a name of referrer: <meta name="referrer" content="strict-origin">


How did we do?


Powered by HelpDocs (opens in a new tab)