Use this doc to install Heap on Electron apps. For web installation instructions, see our web installation guide.
Electron support is a work in progress and not yet officially supported by Heap!
If you run into any issues, please reach out to [email protected]. We would love to work with you to improve our support for Electron apps.
Electron doesn't natively support cookies, so Heap's JavaScript web snippet won't work out-of-the-box. We're currently working on a fork of the electron-cookies
package that allows Heap to function within Electron apps, if you'd like to give it a try, it's available in our Github. To use the forked electron-cookies
package in your Electron app, add it to your package.json
dependencies like so:
{
"dependencies": {
"electron-cookies": "heap/electron-cookies"
}
}
After you npm install
the package, you should be able to add require('electron-cookies');
to your application’s renderer.js
, and include the web snippet above in your application’s HTML.
If your application has nodeIntegration: false
in its configuration (this is the most common setup), instead of adding require('electron-cookies');
include the following script tag to your application’s HTML after running npm install:
<script src='./node_modules/electron-cookies/dist/electron-cookies.js'></script>
Updated 5 months ago