Google Analytics Error


#1

Hello, here is the error I have with google analytics

`Cannot read property ‘lastUsedAt’ of undefined

Stack:
TypeError: Cannot read property ‘lastUsedAt’ of undefined
at GoogleAnalytics.saveStartStateAndLastUsed (C:\Users\jerome\Desktop\GoogleAnalysticsPlayer\node_modules\jovo-analytics-googleanalytics\src\GoogleAnalytics.ts:32:53)
at Middleware.run (C:\Users\jerome\Desktop\GoogleAnalysticsPlayer\node_modules\jovo-core\src\core\Middleware.ts:85:20)
at Middleware.run (C:\Users\jerome\Desktop\GoogleAnalysticsPlayer\node_modules\jovo-core\src\core\Middleware.ts:63:62)
at App.handle (C:\Users\jerome\Desktop\GoogleAnalysticsPlayer\node_modules\jovo-core\src\core\BaseApp.ts:274:41)
at App.handle (C:\Users\jerome\Desktop\GoogleAnalysticsPlayer\node_modules\jovo-framework\src\App.ts:333:5)
at C:\Users\jerome\Desktop\GoogleAnalysticsPlayer\src\index.js:20:5

Request details:
this.$alexaSkill initialized
this.$type: {“type”:“LAUNCH”}
this.$session.$data : {}
this.$nlu : {}
this.$inputs : {}

unhandledRejection
{}

All errors are here

Thanks for your help


#2

Hey @zigou13, can you share all the plugins that you added to app.use?


#3

Maybe you haven’t enabled metadata.

Add this to your config.js

user: { metaData: true, },

More info here:


#4

Thanks! We should probably evaluate this. The Google Analytics plugin should still work, even without metadata being enabled.

What do you think @AlexSwe?


#5

Yes, should be possible without enabled metadata.

I’m not very experienced with the Google Analytics plugin, but maybe it only makes sense with the metadata?!


#6

yes it’s good,
thank you my friend