Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Velluppillai <justin@innocraft.com>2021-06-25 12:57:55 +0300
committerGitHub <noreply@github.com>2021-06-25 12:57:55 +0300
commitce3e9f996f29219f3f703768400036ac40ca0107 (patch)
tree70ad7f7dd15b6d4c7bcf141e43cf689c2fab80bc /plugins/Morpheus/templates/javascriptCode.twig
parent64f92d054a06b61f9ea009e8a0b2b053ad6da15a (diff)
Remove type attribute from tracking code (#17685)
* Remove redundant type="text/javascript" from matomo tracking code, see #17281 * Fix system test expected output * Fix more system tests' expected output * Fix integration tests * Fixed UI tests failure caused by removing type attribute from script tags * Fix UI tests * Fix lfs screenshot * plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_deleted.png: convert to Git LFS * plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_permissions_bulk_access_set.png: convert to Git LFS * tests/UI/expected-screenshots/UIIntegrationTest_invalid_idsite_superuser.png: convert to Git LFS * tests/UI/expected-screenshots/EmptySite_emptySiteDashboard.png: convert to Git LFS * tests/UI/expected-screenshots/UIIntegrationTest_admin_manage_tracking_code.png: convert to Git LFS Co-authored-by: sgiehl <stefan@matomo.org>
Diffstat (limited to 'plugins/Morpheus/templates/javascriptCode.twig')
-rw-r--r--plugins/Morpheus/templates/javascriptCode.twig6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/Morpheus/templates/javascriptCode.twig b/plugins/Morpheus/templates/javascriptCode.twig
index 20780230d2..1a3fde3ebf 100644
--- a/plugins/Morpheus/templates/javascriptCode.twig
+++ b/plugins/Morpheus/templates/javascriptCode.twig
@@ -1,5 +1,5 @@
<!-- Matomo -->
-<script type="text/javascript">
+<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
{$options} _paq.push(['trackPageView']);
@@ -9,11 +9,11 @@
{$optionsBeforeTrackerUrl}_paq.push(['setTrackerUrl', u+'{$matomoPhpFilename}']);
_paq.push(['setSiteId', '{$idSite}']);
{% if loadAsync %}var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
- g.type='text/javascript'; g.async=true; g.src=u+'{$matomoJsFilename}'; s.parentNode.insertBefore(g,s);{% endif %}
+ g.async=true; g.src=u+'{$matomoJsFilename}'; s.parentNode.insertBefore(g,s);{% endif %}
})();
</script>
-{% if not loadAsync %}<script type='text/javascript' src="{$protocol}{$piwikUrl}/{$matomoJsFilename}"></script>
+{% if not loadAsync %}<script src="{$protocol}{$piwikUrl}/{$matomoJsFilename}"></script>
{% endif %}
{% if trackNoScript %}<noscript><p><img src="{$protocol}{$piwikUrl}/{$matomoPhpFilename}?idsite={$idSite}&amp;rec=1" style="border:0;" alt="" /></p></noscript>
{% endif %}