Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
leximpact-socio-fiscal-ui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leximpact
Simulateur socio-fiscal
leximpact-socio-fiscal-ui
Commits
c8325c73
Commit
c8325c73
authored
1 year ago
by
Toufic Batache
Browse files
Options
Downloads
Patches
Plain Diff
Ajout des stats matomo pour tracker le bouton accordéon des graphiques cas types
parent
2d023c0d
No related branches found
No related tags found
1 merge request
!207
Ajout des stats matomo pour tracker le bouton accordéon des graphiques cas types
Pipeline
#13070
passed
1 year ago
Stage: build
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/lib/components/WaterfallView.svelte
+9
-3
9 additions, 3 deletions
src/lib/components/WaterfallView.svelte
src/lib/matomo.ts
+17
-0
17 additions, 0 deletions
src/lib/matomo.ts
with
26 additions
and
3 deletions
src/lib/components/WaterfallView.svelte
+
9
−
3
View file @
c8325c73
...
...
@@ -34,6 +34,7 @@
import
type
{
DisplayMode
}
from
"
$lib/displays
"
import
{
entityByKey
,
personEntityKey
}
from
"
$lib/entities
"
import
type
{
VariableCustomization
,
VariableGraph
}
from
"
$lib/graphes
"
import
{
trackTestCaseGraph
}
from
"
$lib/matomo
"
import
{
type
CalculationByName
,
getSituationVariableValue
,
...
...
@@ -1112,9 +1113,14 @@
{
#if
firstPersonActivity
!==
"
inactif
"
}
<button
class=
"w-full flex items-center gap-2 text-neutral-600 text-start border-b px-4 py-2 mt-10 hover:bg-neutral-100 active:bg-neutral-200 transition-all"
on:click=
{
situation
.
slider
===
undefined
?
requestAxesCalculation
:
removeSituationSlider
}
on:click=
{
()
=>
{
if
(
situation
.
slider
===
undefined
)
{
requestAxesCalculation
()
trackTestCaseGraph
(
firstPersonActivity
)
}
else
{
removeSituationSlider
()
}
}}
>
<iconify-icon
class=
"text-lg"
icon=
"ri-line-chart-fill"
/>
<span
class=
"flex-1 font-bold"
>
...
...
This diff is collapsed.
Click to expand it.
src/lib/matomo.ts
+
17
−
0
View file @
c8325c73
import
{
browser
}
from
"
$app/environment
"
import
type
{
ParametricReform
}
from
"
$lib/reforms
"
import
type
{
VariableValue
}
from
"
$lib/variables
"
function
trackEvent
(
category
:
string
,
action
:
string
,
name
:
string
)
{
if
(
browser
)
{
...
...
@@ -206,3 +207,19 @@ export function trackTestCaseShowAllVariables() {
export
function
trackTestCaseShare
()
{
trackEvent
(
"
test_case
"
,
"
share
"
,
"
Partage d'une simulation cas type
"
)
}
export
function
trackTestCaseGraph
(
activity
:
VariableValue
|
undefined
)
{
let
variable
=
"
revenu
"
switch
(
activity
)
{
case
"
actif
"
:
variable
=
"
salaire
"
break
case
"
retraite
"
:
variable
=
"
retraite
"
break
case
"
chomeur
"
:
variable
=
"
chômage
"
break
}
trackEvent
(
"
test_case
"
,
"
show_graph
"
,
`Ouverture du graphique "
${
variable
}
"`
)
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment