Integrate "HelloAnalytics" from Google with Ionic Framework

I’ve managed to make the HelloAnalytics.html provided by Google to work as expected on a server, but I can’t really figure it out how I can implement this in Ionic app.
What Authorized JavaScript origins should I use?
Can I just use basic Javascript instead of Angular?
If yes, can the js code be placed in index.html?

I’m talking about this Demo: https://ga-dev-tools.appspot.com/embed-api/basic-dashboard/

Thank you!