Implementing google analytics component in a Reactive app to be consumed by others

I'm trying to implement google analytics in a web app that only has a web block with a feedback survey. I want to analyze and keep track  of the usage of this component in other apps without the need to make any changes on those apps. The problem is that google analytics asks for a Website URL to set up data streams... Does anyone have any ideas how to get around this?

Hello Joao

One thing you can try is enabling tracking of events using this component


Yes, I was trying to use it but for that we need a tracking Id and I cannot obtain one. That is my main problem

So, you don't have the website URL to authenticate and get the ID from there? How to give accessibility to users without it? 

The G A tracking must be set on my component which is going to be used by other applications, its a feedback survey. I need to monitor the usage of my component regardless the application it is being used on. The problem is that it's only a web block that will be consumed by other applications. Can it be done?

Through Google Analytics it is not possible as it needs to URL to verify web and package name to verify the app. 

Another way is: You can attach listeners to block events like OnInitial, Ready, Render....  and use XHR/Fetch to send the event and any other available information surrounding the event to an API that will store it.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.