ember-metrics icon indicating copy to clipboard operation
ember-metrics copied to clipboard

Do I need to do anything special to load just one of the default adapters?

Open Rui-Santos opened this issue 6 years ago • 1 comments

I just wish to use the piwik adapter, but I'm thinking maybe it will install all of them in my ember app, which is a burden, installing things that aren't needed. Do I need to do something to avoid that, or just configuring the adapter I need will leave all the other adapters out?

Thank you! And sorry for the lame question. I'm not really a developer, so I really don't know much about how it all works.

Rui-Santos avatar Apr 11 '18 13:04 Rui-Santos

If you're using the metricsAdapters configuration in your ember-cli project's environment.js file, then there's nothing more you need to do. It will only include the adapters you've defined. There won't be any extra overhead from unused adapters.

However, if you're lazy initializing, you'll want to include them specifically in your environment.js file to ensure they (and only they) get included. Like this:

'ember-metrics': {
   includeAdapters: ['google-analytics']
 },

evansims avatar Jun 23 '18 20:06 evansims