Skip to content

Commit c4fe99e

Browse files
Fix Matomo attributes (#263)
* feat: 📈 update matomo content tracking
1 parent 992cfa3 commit c4fe99e

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Current (in progress)
44

5-
- Nothing yet
5+
- Update Matomo content tracking data-attributes [#263](https://github.com/opendatateam/udata-recommendations/pull/263)
66

77
## 3.1.4 (2023-03-07)
88

requirements/test.pip

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
pytest==4.6.3
2-
pytest-flask==0.15.0
3-
pytest-sugar==0.9.2
1+
pytest==7.2.1
2+
pytest-flask==1.2.0
3+
pytest-sugar==0.9.6
44
requests-mock==1.7.0
55
mock==3.0.5
66
pytest-mock==2.0.0

udata_recommendations/templates/dataset-recommendations-externals.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
{%- if messages and id %}
44
<div
55
data-track-content
6-
data-content-name="dataset external"
7-
data-content-piece="reco"
6+
data-content-name="external recommendations"
7+
data-content-piece="{{ id }}"
88
data-content-target="{{ id }}"
99
>
1010
{{ banner_info_lg(

udata_recommendations/templates/dataset-recommendations-reuses.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ <h3 class="subtitle subtitle--uppercase">
1212
class="fr-col-lg-3 fr-col-sm-6 fr-col-12"
1313
data-track-content
1414
data-content-name="reuse recommendations"
15-
data-content-piece="reco {{ loop.idx }}"
16-
data-content-target="reuses/{{ reuse.id }}"
15+
data-content-piece="{{ reuse.title }}"
16+
data-content-target="{{ url_for('reuses.show', reuse=reuse, _external=True) }}"
1717
>
1818
{% include theme('reuse/card.html') with context %}
1919
</div>

udata_recommendations/templates/dataset-recommendations.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ <h3 class="subtitle subtitle--uppercase fr-m-0">
99
class="fr-mb-2w"
1010
data-track-content
1111
data-content-name="dataset recommendations"
12-
data-content-piece="reco {{ loop.idx }}"
13-
data-content-target="datasets/{{ dataset.id }}"
12+
data-content-piece="{{ dataset.full_title }}"
13+
data-content-target="{{ url_for('datasets.show', dataset=dataset) }}"
1414
>
1515
{% include theme('dataset/card-sm.html') with context %}
1616
</div>

0 commit comments

Comments
 (0)