feat(analytics): include MatomoHandler by default
This commit is contained in:
committed by
Saúl Ibarra Corretgé
parent
4c635a2a63
commit
bdd129b9a2
@@ -10,7 +10,7 @@ import {
|
||||
checkChromeExtensionsInstalled,
|
||||
isMobileBrowser
|
||||
} from '../base/environment/utils';
|
||||
import { AmplitudeHandler } from './handlers';
|
||||
import { AmplitudeHandler, MatomoHandler } from './handlers';
|
||||
import logger from './logger';
|
||||
|
||||
/**
|
||||
@@ -94,6 +94,13 @@ export function createHandlers({ getState }: { getState: Function }) {
|
||||
// eslint-disable-next-line no-empty
|
||||
} catch (e) {}
|
||||
|
||||
try {
|
||||
const matomo = new MatomoHandler(handlerConstructorOptions);
|
||||
|
||||
handlers.push(matomo);
|
||||
// eslint-disable-next-line no-empty
|
||||
} catch (e) {}
|
||||
|
||||
return (
|
||||
_loadHandlers(scriptURLs, handlerConstructorOptions)
|
||||
.then(externalHandlers => {
|
||||
|
||||
@@ -7,7 +7,7 @@ import AbstractHandler from './AbstractHandler';
|
||||
/**
|
||||
* Analytics handler for Matomo.
|
||||
*/
|
||||
class MatomoHandler extends AbstractHandler {
|
||||
export default class MatomoHandler extends AbstractHandler {
|
||||
|
||||
/**
|
||||
* Creates new instance of the Matomo handler.
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
export { default as AmplitudeHandler } from './AmplitudeHandler';
|
||||
export { default as MatomoHandler } from './MatomoHandler';
|
||||
|
||||
Reference in New Issue
Block a user