Google Analytics v4 variables in mobile app

I am using tutor v14.01.
I am using open edx app version nutmeg.1 for iOS and Android.
I added Google Analytics v4 file to the project and it started to track data.
My questions are:
Does the app send any custom data to GA like course id, user Id,…?
What do I need to set up on GA console to start querying these data through GA API?
I tried to look for this information on app github but couldn’t find it, please help me.
Thanks!

1 Like

Can you please guide me how to enable GA 4 on tutor. GA doesn’t track my site.
I add these code to my main.html but it doesn’t work at all. What else do I need to do?

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-XXXXXXXXX');
</script>

You can add the script to pages you want to track.
You need to wait for 48h until data appear on your Analytics console.

Troubleshooting
F12 to inspect HTML elements to see if your script is included in the page.
Use Google Analytics Debugger to debug.

1 Like

Thanks! Is it enough to put the script only in main.html or index.html or both?

I put it in main.html
you can read more at this topic

1 Like