raae / pow-app

Take charge of your menstrual cycle with POW! — the privacy-first menstrual cycle journal
https://www.usepow.app/
GNU General Public License v3.0
33 stars 2 forks source link

Add goal tracking to the export feature #302

Closed raae closed 3 years ago

raae commented 3 years ago

When the user clicks the export button it should be tracked.

  1. Add GATSBY_FATHOM_EXPORT to your .env.development (any value will due)
  2. Export FATHOM_EXPORT from ./constants
  3. Import the trackGoal function from the tracking feature.
  4. Import FATHOM_EXPORT from ./constants
  5. When button is clicked call trackGoal with FATHOM_EXPORT as param
  6. Test and make sure the console logs out Track fathom goal <FATHOM_EXPORT>)

I will add a real value to Netlify env variables so this will be tracked properly by fathom in production.

olavea commented 3 years ago

Question about

  1. When button is clicked call trackGoal with FATHOM_EXPORT as param A. Should trackGoal be called after openSaveFileDialog? or B. Should trackGoal be called before openSaveFileDialog?

I am currently going with "B", but you're the POW! Queen @raae 👑 so it's your call.

raae commented 3 years ago

Let's do before, as if it fails the intent of the user is still to export. Later we can add some error tracking. Ie B as you suggested.