Skip to content

Commit

Permalink
ignore tests
Browse files Browse the repository at this point in the history
  • Loading branch information
goemen committed May 1, 2024
1 parent f220447 commit 2f29047
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 8 deletions.
1 change: 1 addition & 0 deletions frontend/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import component from 'v-viewer';
import VueDOMPurifyHTML from 'vue-dompurify-html';

import { initializeSnowplow } from './snowplow';
/* istanbul ignore next */
initializeSnowplow(import.meta.env.VITE_SNOWPLOW_URL);

const myCustomLightTheme = {
Expand Down
34 changes: 26 additions & 8 deletions frontend/src/snowplow.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,40 @@
// <!-- Snowplow starts plowing - Standalone vE.2.14.0 -->
/* istanbul ignore next */
export const initializeSnowplow = (url) => {
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","https://www2.gov.bc.ca/StaticWebResources/static/sp/sp-2-14-0.js","snowplow"));
window.snowplow('newTracker','rt', url, {
(function (p, l, o, w, i, n, g) {
if (!p[i]) {
p.GlobalSnowplowNamespace = p.GlobalSnowplowNamespace || [];
p.GlobalSnowplowNamespace.push(i);
p[i] = function () {
(p[i].q = p[i].q || []).push(arguments);
};
p[i].q = p[i].q || [];
n = l.createElement(o);
g = l.getElementsByTagName(o)[0];
n.async = 1;
n.src = w;
g.parentNode.insertBefore(n, g);
}
})(
window,
document,
'script',
'https://www2.gov.bc.ca/StaticWebResources/static/sp/sp-2-14-0.js',
'snowplow',
);
window.snowplow('newTracker', 'rt', url, {
appId: 'Snowplow_standalone',
cookieLifetime: 86400 * 548,
platform: 'web',
post: true,
forceSecureTracker: true,
contexts: {
webPage: true,
performanceTiming: true
}
performanceTiming: true,
},
});
window.snowplow('enableActivityTracking', 30, 30); // Ping every 30 seconds after 30 seconds
window.snowplow('enableLinkClickTracking');
window.snowplow('trackPageView');
// <!-- Snowplow stops plowing -->
}
};

0 comments on commit 2f29047

Please sign in to comment.