6
votes

I am trying to build a desktop app using Electron with Google Analytics data. I am using Google Analytics Embed API. I get gapi.auth2.ExternallyVisibleError: Invalid cookiePolicy error during authorization. I tried using 'electron-cookies' which seemed to set cookie in local storage but I still face the issue.

 gapi.analytics.auth.authorize({
    container: 'auth-button',
    clientid: CLIENT_ID
});

My guess is electron uses local storage for handling cookies. Is there any workaround for this? Thanks!

1

1 Answers

0
votes

You may have better luck using something like electron-google-analytics.