Skip to content

Commit

Permalink
feat(forum): fin de l'AB test sur la notation des forums (#708)
Browse files Browse the repository at this point in the history
## Description

🎸 Fin de l'AB test #686 
🎸 Selection de la version originale

## Type de changement

🎨 changement d'UI

### Captures d'écran (optionnel)


![image](https://github.com/gip-inclusion/itou-communaute-django/assets/11419273/20765618-7fee-43d0-a678-e55c279b39fa)
  • Loading branch information
vincentporte authored Jul 4, 2024
1 parent 1938e84 commit 6705ead
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 47 deletions.
39 changes: 0 additions & 39 deletions lacommunaute/templates/forum/forum_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,42 +136,3 @@ <h1>{{ forum.name }}</h1>
{% endif %}
{% endblock forum_foot_content %}
{% endblock content %}
{% block extra_js %}
{{ block.super }}
<!-- Matomo A/B Test -->
<script nonce="{{ request.csp_nonce }}">
var _paq = _paq || [];
_paq.push(['AbTesting::create', {
name: 'RatingForum_Position', // you can also use '8' (ID of the experiment) to hide the name
percentage: 100,
includedTargets: [{"attribute":"url","inverted":"0","type":"any","value":""}],
excludedTargets: [],
startDateTime: '2024/06/18 00:00:00 UTC',
variations: [
{
name: 'original',
activate: function (event) {
// usually nothing needs to be done here
}
},
{
name: 'rating_area_2', // you can also use '13' (ID of the variation) to hide the name
activate: function(event) {
$("#rating-area2").removeClass("d-none")
$("#rating-area1").addClass("d-none")
}
}, {
name: 'rating_area_3', // you can also use '14' (ID of the variation) to hide the name
activate: function(event) {
$("#rating-area3").removeClass("d-none")
$("#rating-area1").addClass("d-none")
}
}
],
trigger: function () {
return true; // here you can further customize which of your visitors will participate in this experiment
}
}]);
</script>
<!-- Matomo A/B Test -->
{% endblock %}
8 changes: 0 additions & 8 deletions lacommunaute/templates/forum/forum_documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
<div class="col-12 col-sm-auto mt-3">
<div class="textarea_cms_md">{{ forum.description.rendered|urlizetrunc_target_blank:30 }}</div>
</div>
{% comment %} Proposition A Testing {% endcomment %}
{% include "forum/partials/rating.html" with forum=forum rating_area_id="1" %}
{% comment %} Proposition A Testing {% endcomment %}
</div>
</div>
<div class="col-12 col-lg-3">
Expand All @@ -42,9 +40,6 @@
<span>{% trans "New topic on doc" %}</span>
</a>
{% endif %}
{% comment %} Proposition B Testing {% endcomment %}
{% include "forum/partials/rating.html" with forum=forum onSidebar=True rating_area_id="2" hidden=True %}
{% comment %} Proposition B Testing {% endcomment %}
<hr>
<a href="{% url 'forum_extension:forum' forum.parent.slug forum.parent.id %}"
class="matomo-event h3 text-decoration-none d-inline-block"
Expand All @@ -58,9 +53,6 @@
</li>
{% endfor %}
</ul>
{% comment %} Proposition C Testing {% endcomment %}
{% include "forum/partials/rating.html" with forum=forum onSidebar=True rating_area_id="3" hidden=True %}
{% comment %} Proposition C Testing {% endcomment %}
</div>
</div>
{% endblock forum_head_content %}

0 comments on commit 6705ead

Please sign in to comment.