Installation guides
Bubble
Add ProductLense to a Bubble app through the script and meta tags header in Settings, then publish to live.
Bubble lets you add code to the header of every page of your app from its settings. Paste the ProductLense script there and deploy to live.
Add the script
- In the Bubble editor, open Settings → SEO / metatags.
- Paste the two tags into Script/meta tags in header. Replace
SITE_IDwith the id from Settings → Sites in the ProductLense dashboard. - Deploy the app to live.
<script>window.productlense=window.productlense||function(){(window.productlense.q=window.productlense.q||[]).push(arguments)}</script>
<script defer data-site="SITE_ID" src="https://api.productlense.app/a.js"></script>Add your custom domain, and the bubbleapps.io address if you test on it, to the site's hostnames in the ProductLense dashboard.
Verify your installation
- Deploy to live, then open the live app in a normal browser window.
- Open the Live page in the ProductLense dashboard. Your visit appears within a few seconds.
- In the browser's developer tools, the Network tab shows a
POSTtohttps://api.productlense.app/api/ewith status204.
The version-test preview runs on a different URL; add it to the site's hostnames only if you want those visits counted. Ad blockers in your own browser may block the request. If the visit does not appear, follow Verify your installation.