Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Avoid active initialization for each app #2

Open
thinkh opened this issue Aug 29, 2019 · 0 comments
Open

Avoid active initialization for each app #2

thinkh opened this issue Aug 29, 2019 · 0 comments
Assignees
Labels
type: refactor Refactor the current implementation

Comments

@thinkh
Copy link
Member

thinkh commented Aug 29, 2019

The current approach requires an active initialization of the matomo tracking:

const trackableActions: ITrackableAction[] = [
  // id = phovea extension id
  {id: 'targidCreateView', event: {category:'view', action: 'create'}},
];
trackApp(app, trackableActions);

In addition the we duplicate the actionFunctions in the action.ts:

// from tdp_core\src\internal\cmds.ts
trackableActions.set('tdpInitSession', {category:'session', action: 'init'});
trackableActions.set('tdpSetParameter', {category:'view', action: 'setParameter'});
// from tdp_core\src\lineup\internal\scorecmds.ts
trackableActions.set('tdpAddScore', {category:'score', action: 'add'});
trackableActions.set('tdpRemoveScore', {category:'score', action: 'remove'});
// from tdp_core\src\lineup\internal\cmds.ts
trackableActions.set('lineupSetRankingSortCriteria', {category:'lineup', action: 'setRankingSortCriteria'});
trackableActions.set('lineupSetSortCriteria', {category:'lineup', action: 'setRankingSortCriteria'});
trackableActions.set('lineupSetGroupCriteria', {category:'lineup', action: 'setGroupCriteria'});
trackableActions.set('lineupAddRanking', {category:'lineup', action: 'addRanking'});
trackableActions.set('lineupSetColumn', {category:'lineup', action: 'setColumn'});
trackableActions.set('lineupAddColumn', {category:'lineup', action: 'addColumn'});
trackableActions.set('lineupMoveColumn', {category:'lineup', action: 'moveColumn'});

A better approach would be to filter phovea extensions with id actionFunction. Only action functions that are annotated with the required name category and action will be tracked then.

@thinkh thinkh added the type: refactor Refactor the current implementation label Aug 29, 2019
@thinkh thinkh self-assigned this Aug 29, 2019
@thinkh thinkh mentioned this issue Sep 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: refactor Refactor the current implementation
Projects
None yet
Development

No branches or pull requests

1 participant