Replies: 1 comment 1 reply
-
Our installation worked with the recommend setup but stopped working randomly and we had to switch to exposing it directly to the window object. Any reason why we would have to do that? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
There are many ways of setting up an Electron app. While our recommended setup should work on any modern setup, it may fail to work on older versions of Electron.
If the recommended setup doesn't work for you, try this:
Install
Install the SDK using your preferred JavaScript package manager
Main Setup
On your
main
script, initialize the SDK before the app is ready:Preload Setup
On your
preload
script, expose trackEvent on your window object.You can use
contextBridge
if that's supported on your electron version.Alternatively, if it doesn't, you can expose it directly on the window object
Usage
You can now trackEvents from your
main
process by using the@aptabase/electron
:In your client code, use the window object:
Beta Was this translation helpful? Give feedback.
All reactions