Skip to content

Commit

Permalink
Better encapsulate the analytics shared component #3229
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcmoulton committed May 8, 2024
1 parent 6197fd0 commit 73a37ab
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
@@ -1,7 +1,7 @@
import * as O from 'fp-ts/Option';
import { constant, pipe } from 'fp-ts/function';
import { HtmlFragment, toHtmlFragment } from '../types/html-fragment';
import { UserId } from '../types/user-id';
import { HtmlFragment, toHtmlFragment } from '../../../../types/html-fragment';
import { UserId } from '../../../../types/user-id';

const renderCookieBotScript = `
<script id="Cookiebot" src="https://consent.cookiebot.com/uc.js" data-cbid="56f22051-f915-4cf1-9552-7d8f64d81152" data-blockingmode="auto"></script>
Expand Down
@@ -0,0 +1 @@
export { fathom, googleTagManager, googleTagManagerNoScript } from './analytics';
2 changes: 1 addition & 1 deletion src/read-side/html-pages/shared-components/head/head.ts
Expand Up @@ -3,9 +3,9 @@ import * as O from 'fp-ts/Option';
import { pipe } from 'fp-ts/function';
import { ClientClassification } from './client-classification';
import { DynamicHeadViewModel } from './dynamic-head-view-model';
import { fathom, googleTagManager } from '../../../../shared-components/analytics';
import { HtmlFragment, toHtmlFragment } from '../../../../types/html-fragment';
import { UserId } from '../../../../types/user-id';
import { fathom, googleTagManager } from '../analytics';

const renderWithClientClassification = (headTagContents: string, clientClassification: ClientClassification) => `
<head data-user-agent="${htmlEscape(clientClassification.userAgent ?? '')}">
Expand Down
2 changes: 1 addition & 1 deletion src/read-side/html-pages/wrap-in-html-document.ts
Expand Up @@ -2,8 +2,8 @@ import * as O from 'fp-ts/Option';
import { pipe } from 'fp-ts/function';
import { CompleteHtmlDocument, toCompleteHtmlDocument } from './complete-html-document';
import { ContentWrappedInLayout } from './content-wrapped-in-layout';
import { googleTagManagerNoScript } from './shared-components/analytics';
import { DynamicHeadViewModel, head } from './shared-components/head';
import { googleTagManagerNoScript } from '../../shared-components/analytics';
import { UserDetails } from '../../types/user-details';

const serverStartupTimestamp = new Date();
Expand Down

0 comments on commit 73a37ab

Please sign in to comment.