track events with matomo
This commit is contained in:
parent
7377288554
commit
223edbc507
@ -18,6 +18,8 @@ const logKeyShortcut = (keyCode) => {
|
|||||||
try {
|
try {
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
window.plausible("KeyShortcut", { props: { keyCode } });
|
window.plausible("KeyShortcut", { props: { keyCode } });
|
||||||
|
// eslint-disable-next-line
|
||||||
|
_paq.push(['trackEvent', 'GalleryImage', 'KeyShortcut', keyCode]);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
/* do nothing */
|
/* do nothing */
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ export default function HTML(props) {
|
|||||||
{env === "production" && (
|
{env === "production" && (
|
||||||
<script>{`window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }`}</script>
|
<script>{`window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }`}</script>
|
||||||
)}
|
)}
|
||||||
{true && (
|
{env === "production" && (
|
||||||
<script
|
<script
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: `
|
__html: `
|
||||||
|
@ -139,6 +139,8 @@ const IndexPage = ({
|
|||||||
window.plausible("Shuffle", {
|
window.plausible("Shuffle", {
|
||||||
props: { currentImage: currentImage?.base },
|
props: { currentImage: currentImage?.base },
|
||||||
});
|
});
|
||||||
|
// eslint-disable-next-line
|
||||||
|
_paq.push(['trackEvent', 'Index', 'Shuffle', currentImage?.base]);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
/* do nothing */
|
/* do nothing */
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user