Page MenuHomeSoftware Heritage

templates/layout: Add Inria matomo (piwik) tracking code
ClosedPublic

Authored by anlambert on Nov 9 2020, 5:14 PM.

Details

Summary

Add matomo tracking code in base layout.html template.

As I could not create new websites on the Inria Matomo Web UI (even if I have the admin rights),
I added archive.so and docs.so subdomains on the current declared softwareheritage.org website.

The diff also contains two other commits related to declaring license info
for the newly loaded matomo.js script.

Related to T2762

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build has FAILED

Patch application report for D4451 (id=15760)

Rebasing onto 3a64edd836...

Current branch diff-target is up to date.
Changes applied before test
commit 4e096fd0cb5b0d04c57782da241dedec377834dc
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Nov 9 17:11:09 2020 +0100

    webpack/config: Declare license info for Inria matomo script

commit 802315aac3b485d63f467dcee540d716fa2f915b
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Nov 9 17:06:56 2020 +0100

    webpack/weblabels-plugin: Enable to target external license files
    
    When declaring additional scripts not processed by webpack, enable to target
    an external license file.

commit eb8a1189e26a978f0890218744a35c591b7cf377
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Nov 9 17:05:40 2020 +0100

    templates/layout: Add Inria matomo (piwik) tracking code
    
    Related to T2762

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/463/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/463/console

Update: Rebase and integrate tracking code only in production

Build is green

Patch application report for D4451 (id=15763)

Rebasing onto a933cce78b...

Current branch diff-target is up to date.
Changes applied before test
commit 12ef9e195db0a39cd6b0cc044e4a555af19148c6
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Nov 9 17:11:09 2020 +0100

    webpack/config: Declare license info for Inria matomo script

commit efa793f9c1c13131cd596b92e5b6a191a612e624
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Nov 9 17:06:56 2020 +0100

    webpack/weblabels-plugin: Enable to target external license files
    
    When declaring additional scripts not processed by webpack, enable to target
    an external license file.

commit 574a043e5ef5072fe2bd1f62676b67f9cae80f63
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Nov 9 17:05:40 2020 +0100

    templates/layout: Add Inria matomo (piwik) tracking code
    
    Related to T2762

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/465/ for more details.

Update: Use a better way to detect production mode in templates

Build is green

Patch application report for D4451 (id=15770)

Rebasing onto a933cce78b...

Current branch diff-target is up to date.
Changes applied before test
commit daf8ceec59cc8406d052e925ec37b30a788dc566
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Nov 9 17:11:09 2020 +0100

    webpack/config: Declare license info for Inria matomo script

commit ab30f623975d02bd4d0933e0570b340dfefd2f4e
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Nov 9 17:06:56 2020 +0100

    webpack/weblabels-plugin: Enable to target external license files
    
    When declaring additional scripts not processed by webpack, enable to target
    an external license file.

commit 4fe7e4cddfe0fda5ec1fda350cce9b48d411ad30
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Nov 9 17:05:40 2020 +0100

    templates/layout: Add Inria matomo (piwik) tracking code
    
    Related to T2762

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/466/ for more details.

Shouldn't this kind of script be at the end of a page, so the rest of the page loads faster?

Shouldn't this kind of script be at the end of a page, so the rest of the page loads faster?

The matomo documentation recommends to put it at the beginning of the page and I did not observe any kind of slowdown when loading pages after that change.

oh indeed, I didn't notice it's loaded asynchronously

Update: Do not enable link tracking

Build is green

Patch application report for D4451 (id=15841)

Rebasing onto a933cce78b...

Current branch diff-target is up to date.
Changes applied before test
commit f5469a4a1666aa07614370f129bd522f6cade7e1
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Nov 9 17:11:09 2020 +0100

    webpack/config: Declare license info for Inria matomo script

commit d6b201d4970eb5accd7768a503cb3e6fd2591c82
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Nov 9 17:06:56 2020 +0100

    webpack/weblabels-plugin: Enable to target external license files
    
    When declaring additional scripts not processed by webpack, enable to target
    an external license file.

commit ecaa9c353fab744bdbe4cddf862b694abaf30d18
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Nov 9 17:05:40 2020 +0100

    templates/layout: Add Inria matomo (piwik) tracking code
    
    Related to T2762

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/467/ for more details.

This revision is now accepted and ready to land.Nov 12 2020, 3:23 PM