Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wanting to use an adapter that isn't defined does not throw an error #275

Open
moekify opened this issue Mar 10, 2021 · 0 comments
Open

Comments

@moekify
Copy link

moekify commented Mar 10, 2021

Hi!

First of, thanks for creating such a great add-on that makes implementation of tracking/metrics solutions very straightforward.

For our use-case we had to extend an existing adapter (GoogleTagManager GTM) to add some additional params so our consent solution would work in a GDPR conform manner. The whole extending is very straightforward and works out of the box.

As part of this extension we removed the setup of the standard GTM adapter in the environment file and replaced it with setting up our custom adapter. However, what we did not do is replace all our this.metrics.trackEvent calls that were still pointing to the "original" GTM adapter and not our custom one. In the end, we turned off tracking accidentally this way.

After we identified the issue it was simple to resolve, however we were wondering if it would be beneficial if in these cases ember metrics would throw any kind of error. E.g. Adapter not defined, missing params for this adapter, or similar

Currently, it just seems to be silently failing in the background or were we missing something entirely?

Curious to discuss and happy to supply more information if needed.

Summary

Problem

No errors when an adapter is used with trackEvent that isn't defined

Proposed Solution

Throw some error, potentially with more information why the adapter in question can't work (or trackEvent does not work because adapter isn't defined)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant