@ndla/ui 3.0.11 → 3.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Copyright (c) 2021-present, NDLA.
3
+ *
4
+ * This source code is licensed under the GPLv3 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ import React from 'react';
9
+ import { jsx as ___EmotionJSX } from "@emotion/core";
10
+ export var MatomoTracker = function MatomoTracker(_ref) {
11
+ var trackerUrl = _ref.trackerUrl,
12
+ siteId = _ref.siteId;
13
+ return ___EmotionJSX("script", {
14
+ dangerouslySetInnerHTML: {
15
+ __html: "\n var _paq = window._paq = window._paq || [];\n _paq.push(['trackPageView']);\n _paq.push(['enableLinkTracking']);\n (function() {\n var u=\"".concat(trackerUrl, "\";\n _paq.push(['setTrackerUrl', u+'matomo.php']);\n _paq.push(['setSiteId', '").concat(siteId, "']);\n var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];\n g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);\n })();")
16
+ }
17
+ });
18
+ };
19
+ export default MatomoTracker;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) 2021-present, NDLA.
3
+ *
4
+ * This source code is licensed under the GPLv3 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ import MatomoTracker from './MatomoTracker';
9
+ export default MatomoTracker;