After successfully implementing page tracking in Google Analytics with Angular2 using the solution found at , I encountered an issue.
I'm trying to integrate the following code snippet within a component:
ga('send', {
hitType: 'event',
eventCategory: 'Some Category',
eventAction: 'Level Completed',
eventLabel: 'Level 3'
});
Although this code functions properly within the component, there is an error stating "cannot find ga" in the console.