Skip to content

Commit

Permalink
Apply for company from companies search results
Browse files Browse the repository at this point in the history
When a company has posted job descriptions, the apply button was not
offered. Users had to select the job they were interested in to apply.

By offering an apply button, we expect users will make their
application, then select the job. We expect the new navigation to
increase convenience.

Guarded by an A/B testing Matomo campaign.

GEN-238
  • Loading branch information
francoisfreitag committed Apr 9, 2024
1 parent 2a00397 commit 3d310b3
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
17 changes: 17 additions & 0 deletions itou/templates/companies/includes/_card_siae.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,23 @@ <h3>{{ siae.display_name }}</h3>
</div>
</div>
</div>
{% if siae.active_job_descriptions %}
<div class="d-none matomo-PostulerEmployeurAvecMetier">
<hr class="m-0">
<div class="c-box--results__body">
<div class="d-flex flex-column flex-md-row justify-content-md-between align-items-md-center">
<p class="mb-3 mb-md-0">Cette structure vous intéresse ?</p>
<a class="btn btn-ico btn-primary"
href="{% url 'apply:start' company_pk=siae.pk %}"
{% matomo_event "candidature" "clic" "start_application" %}
aria-label="Postuler auprès de l'employeur solidaire {{ siae.display_name }}">
<i class="ri ri-draft-line" aria-hidden="true"></i>
<span>Postuler</span>
</a>
</div>
</div>
</div>
{% endif %}
<hr class="m-0">

{% if not siae.has_active_members %}
Expand Down
29 changes: 29 additions & 0 deletions itou/templates/search/siaes_search_results.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,33 @@ <h2>Poste{{ job_descriptions_count|pluralizefr }} ouvert{{ job_descriptions_coun
$("#search-form").submit();
});
</script>
{# A / B testing: apply to company with job descriptions #}
<script nonce="{{ CSP_NONCE }}">
var _paq = _paq || [];
_paq.push(['AbTesting::create', {
name: 'PostulerEmployeurAvecMetier',
percentage: 100,
includedTargets: [{
"attribute": "path",
"inverted": "0",
"type": "starts_with",
"value": "\/search\/employers\/results"
}],
excludedTargets: [],
variations: [{
name: 'original',
activate: function() {}
}, {
name: 'apply-employer',
percentage: 50,
activate: function() {
document.getElementsByClassName(".matomo-PostulerEmployeurAvecMetier")
.forEach((elt) => {
elt.classList.remove("d-none")
});
}
}],
trigger: () => document.getElementsByClassName(".matomo-PostulerEmployeurAvecMetier").length,
}]);
</script>
{% endblock %}

0 comments on commit 3d310b3

Please sign in to comment.