Skip to content

Commit

Permalink
Merge pull request #135 from ThatConference/cs/googleSeo
Browse files Browse the repository at this point in the history
Chore: updating sitemap and analytics
  • Loading branch information
theClarkSell committed Nov 10, 2023
2 parents 9829329 + 78d4ad6 commit 00353c7
Show file tree
Hide file tree
Showing 3 changed files with 1,252 additions and 265 deletions.
13 changes: 0 additions & 13 deletions src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,5 @@
charset="utf-8"
type="text/javascript"
src="//js.hsforms.net/forms/embed/v2.js"></script>

<!-- Google Analytics -->
<script defer async src="https://www.googletagmanager.com/gtag/js?id=UA-21705613-11"></script>

<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());

gtag('config', 'UA-21705613-11');
</script>
</body>
</html>
36 changes: 5 additions & 31 deletions src/lib/tagEvent.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,8 @@
import { dev, browser } from '$app/environment';
import va from '@vercel/analytics';
import { browser } from '$app/environment';

// function hstTrackEvent(name, properties = {}) {
// let _hsq = (window._hsq = window._hsq || []);
// _hsq.push([
// 'trackCustomBehavioralEvent',
// {
// name,
// properties
// }
// ]);
// }

function gtagTrackEvent(event, category, label) {
window.gtag('event', event, {
event_category: category,
event_label: label
});
}

export function tagEvent(event, category, label) {
if (!dev && browser) {
gtagTrackEvent(event, category, label);
}
}

export function tagException(message, isFatal = true) {
if (!dev && browser) {
window.gtag('event', 'exception', {
description: message,
fatal: isFatal
});
export function tagEvent(event, category) {
if (browser) {
va.track(`${category}:${event}`);
}
}
Loading

0 comments on commit 00353c7

Please sign in to comment.