Skip to content

Commit

Permalink
(homepage) stop AB Test, add outlined button to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentporte committed Feb 5, 2024
1 parent 361f55c commit 5d73c7e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 47 deletions.
38 changes: 0 additions & 38 deletions lacommunaute/templates/pages/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -206,42 +206,4 @@ <h3 class="m-0">
setTimeout(displayTallyPopup, delayBeforeShowingPopupInSeconds * 1000);
};
</script>
<!-- Matomo A/B Test -->
<script type="text/javascript" nonce="{{ request.csp_nonce }}">
var _paq = _paq || [];
_paq.push(['AbTesting::create', {
name: 'Documentation_sur_la_homepage', // you can also use '4' (ID of the experiment) to hide the name
percentage: 100,
includedTargets: [{
"attribute": "url",
"inverted": "0",
"type": "any",
"value": ""
}],
excludedTargets: [],
variations: [{
name: 'original',
activate: function(event) {
// usually nothing needs to be done here
}
}, {
name: 'btn_plein', // you can also use '6' (ID of the variation) to hide the name
activate: function(event) {
$("#btn_plein").removeClass("d-none")
$("#btn_sep").removeClass("d-none")

}
}, {
name: 'btn_outlined', // you can also use '7' (ID of the variation) to hide the name
activate: function(event) {
$("#btn_outlined").removeClass("d-none")
$("#btn_sep").removeClass("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 %}
11 changes: 2 additions & 9 deletions lacommunaute/templates/partials/ask_a_question.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@
<span>{% trans "Search forums" %}</span>
</a>
</div>
{% comment %}AB Test - variation bouton documentation{% endcomment %}
<div id="btn_sep" class="col-12 col-md-auto py-1 py-md-0 px-md-0 text-center d-none">ou</div>
<div id="btn_plein" class="col-12 col-md-auto d-none">
<a href="{% url 'forum_extension:documentation' %}" class="btn btn-primary btn-ico btn-block matomo-event" data-matomo-category="engagement" data-matomo-action="view" data-matomo-option="documentation">
<span>Consulter la documentation</span>
</a>
</div>
<div id="btn_outlined" class="col-12 col-md-auto d-none">
<div class="col-12 col-md-auto py-1 py-md-0 px-md-0 text-center">ou</div>
<div class="col-12 col-md-auto">
<a href="{% url 'forum_extension:documentation' %}"
class="btn btn-outline-primary btn-ico btn-block matomo-event"
data-matomo-category="engagement"
Expand All @@ -35,6 +29,5 @@
<span>Consulter la documentation</span>
</a>
</div>
{% comment %}END AB Test - variation bouton documentation{% endcomment %}
</div>
{% endif %}

0 comments on commit 5d73c7e

Please sign in to comment.