Skip to content

Commit

Permalink
job_seekers_views: track standalone creation with matomo
Browse files Browse the repository at this point in the history
Add matomo tags in:
- button Créer un compte candidat (list page)
- button Créer le compte candidat (creation step end page)
  • Loading branch information
EwenKorr committed Jan 31, 2025
1 parent b74a0cd commit 60941b9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ <h1 class="my-5">
{% else %}
{% if is_gps|default:False %}
{% itou_buttons_form primary_label="Créer et suivre le bénéficiaire" secondary_url=back_url reset_url=reset_url show_mandatory_fields_mention=False %}
{% elif standalone_creation|default:False %}
{% itou_buttons_form primary_label="Créer le compte candidat" secondary_url=back_url reset_url=reset_url show_mandatory_fields_mention=False matomo_category="compte-candidat" matomo_action="creation" matomo_name="standalone_creation" %}
{% else %}
{% itou_buttons_form primary_label="Créer le compte candidat" secondary_url=back_url reset_url=reset_url show_mandatory_fields_mention=False %}
{% endif %}
Expand Down
4 changes: 3 additions & 1 deletion itou/templates/job_seekers_views/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
<h1 class="m-0">Candidats</h1>
<div class="d-flex flex-column flex-md-row gap-3" role="group" aria-label="Actions sur les candidatures">
{% url "job_seekers_views:get_or_create_start" as get_or_create_url %}
<a href="{% url_add_query get_or_create_url tunnel='standalone' from_url=request.path|urlencode %}" class="btn btn-lg btn-secondary btn-ico">
<a href="{% url_add_query get_or_create_url tunnel='standalone' from_url=request.path|urlencode %}"
{% matomo_event "compte-candidat" "clic" "creer-un-compte-candidat" %}
class="btn btn-lg btn-secondary btn-ico">
<i class="ri-user-add-line fw-medium" aria-hidden="true"></i>
<span>Créer un compte candidat</span>
</a>
Expand Down
2 changes: 1 addition & 1 deletion tests/www/job_seekers_views/__snapshots__/test_list.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<h1 class="m-0">Candidats</h1>
<div aria-label="Actions sur les candidatures" class="d-flex flex-column flex-md-row gap-3" role="group">

<a class="btn btn-lg btn-secondary btn-ico" href="/job-seekers/start?tunnel=standalone&amp;from_url=/job-seekers/list">
<a class="btn btn-lg btn-secondary btn-ico" data-matomo-action="clic" data-matomo-category="compte-candidat" data-matomo-event="true" data-matomo-option="creer-un-compte-candidat" href="/job-seekers/start?tunnel=standalone&amp;from_url=/job-seekers/list">
<i aria-hidden="true" class="ri-user-add-line fw-medium"></i>
<span>Créer un compte candidat</span>
</a>
Expand Down

0 comments on commit 60941b9

Please sign in to comment.