mn6 / nook-desktop

Desktop version of Nook, since Chrome MV3 will render it unusable
227 stars 28 forks source link

[GPDR-Issue] Don't send Telemetry to Google Analytics by default. #90

Open pheeef opened 4 months ago

pheeef commented 4 months ago

Hello,

thank you for this project. I'm a big fan of the app in general.

I was looking through the source code today and found some code that sending requests to google-analytics.

const logVis = (page) => {
  request
    .post('https://www.google-analytics.com/mp/collect')
    .query({
      api_secret: 'V8GvDmXcQmWaAM6HGa0nDg',
      measurement_id: 'G-3Y8P169K9E'
    })
    .send(JSON.stringify({
      client_id: u,
      user_properties: {
        language: {
          value: language
        }
      },
      events: [
        {
          name: 'page_view',
          params: {
            page_title: page,
            page_location: `https://mat.dog/nook/${page}`,
            engagement_time_msec: '5',
            session_id: u
          }
        }
      ]
    }))
    .then(() => {})
    .catch(() => {})
}

Aparrently this happens everytime a button is pressed by invoking the logVis('home') and there is also no option to deactivate it, which is not GDPR compliant.

Tracking/Telemtry has to be Opt-In. (IMHO especially if it's some closed source cloud analytics platform like google)

I'm happy to implement a toggle for this at some point and open a pull request.