How to install the ProfitWell.js Snippet for Engagement Data


ProfitWell Engagement needs you to add bit of JavaScript to your application so that it can track when your customers log into your web-app. Support for mobile applications is coming soon.

Instructions for platform specific instructions below:


<script id="profitwell-js" data-pw-auth="PUBLIC_API_TOKEN_HERE">

profitwell('start', { 'user_email': 'USER_EMAIL_HERE' });
Remember to replace PUBLIC_API_TOKEN_HERE (in the first line) with your public API token.
Remember to replace USER_EMAIL_HERE (at the bottom) with your customer email.
  • You can defer the call to profitwell('start', { 'user_email': 'USER_EMAIL_HERE' }); when the customer identity is loaded asynchronously.
  • If there are multiple users under one user who is being billed, you can substitute user email with the user id from your data provider (e.g. Stripe customer ID). For that, you will need to call profitwell('start', { 'user_id': 'PROVIDER_USER_ID_HERE' }); instead of profitwell('start', { 'user_email': 'USER_EMAIL_HERE' });. You can use either one below:

profitwell('start', {  


profitwell('start', { 
'user_email': 'USER_EMAIL_HERE'
Remember to replace PROVIDER_USER_ID_HERE with the customer ID from your data provider (e.g. Stripe customer ID).

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 policy referrer 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)