Skip to content

Commit

Permalink
chore: replace monsido with siteimprove
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreiffers committed Sep 27, 2024
1 parent 284eeb8 commit 22c65a7
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 150 deletions.
57 changes: 0 additions & 57 deletions src/components/analytics-monsido/index.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions src/components/analytics-monsido/utils/errors.ts

This file was deleted.

41 changes: 0 additions & 41 deletions src/components/analytics-monsido/utils/events.ts

This file was deleted.

17 changes: 0 additions & 17 deletions src/components/analytics-monsido/utils/helpers.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/components/analytics-monsido/utils/index.ts

This file was deleted.

18 changes: 18 additions & 0 deletions src/components/analytics-siteimprove/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { FC, useEffect } from 'react';

const AnalyticsSiteImprove: FC = () => {
useEffect(() => {
const script = document.createElement('script');
script.src = 'https://siteimproveanalytics.com/js/siteanalyze_6255470.js';
script.async = true;

document.body.appendChild(script);
return () => {
document.body.removeChild(script);
};
}, []);

return null;
};

export default AnalyticsSiteImprove;
14 changes: 1 addition & 13 deletions src/components/details-page/components/details-page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ import withCommunity, {
} from '../../../with-community';
import Aside from '../aside';
import { accessRequestWhiteList } from '../../../../white-list';
import {
MonsidoTrackEventParams,
monsidoTrackButtonClickEvent
} from '../../../analytics-monsido/utils/events';

interface ExternalProps {
entity: Entity;
Expand Down Expand Up @@ -326,15 +322,7 @@ const DetailsPage: FC<PropsWithChildren<Props>> = ({
target='_blank'
rel='noreferrer'
>
<Button
onClick={() =>
monsidoTrackButtonClickEvent(
MonsidoTrackEventParams.Action.Click.Button.AccessRequest
)
}
>
{translations.detailsPage.requestDataButton}
</Button>
<Button>{translations.detailsPage.requestDataButton}</Button>
</a>
</SC.AccessRequest>
)}
Expand Down
4 changes: 2 additions & 2 deletions src/entrypoints/main/bootstrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { getConfig } from '../../config';
import { themeFDK, themeNAP } from '../../app/theme';
import GlobalStyles from '../../app/styles';

import AnalyticsMonsido from '../../components/analytics-monsido';
import AnalyticsSiteImprove from '../../components/analytics-siteimprove';
import { store } from '../../redux/store';

const client = new ApolloClient({
Expand All @@ -31,7 +31,7 @@ render(
<GlobalStyles />
<AuthProvider>
<LoggingProvider>
<AnalyticsMonsido />
<AnalyticsSiteImprove />
<ApolloProvider client={client}>
<Provider store={store}>
<BrowserRouter>
Expand Down
4 changes: 2 additions & 2 deletions src/entrypoints/publishing/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import store from '../redux/store';
import GlobalStyles from '../styles';
import Router from '../router';

import AnalyticsMonsido from '../../../components/analytics-monsido';
import AnalyticsSiteImprove from '../../../components/analytics-siteimprove';

const App: FC = () => (
<ThemeProvider>
<GlobalStyles />
<AnalyticsMonsido />
<AnalyticsSiteImprove />
<TranslationsProvider>
<ReduxProvider store={store}>
<Router />
Expand Down
13 changes: 1 addition & 12 deletions src/types/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
export declare global {
interface Window {
monsido_functions: {
trackEvent: (
category: string,
action: string,
event: string,
increaseBy: number
) => string;
};
}
}
export declare global {}

0 comments on commit 22c65a7

Please sign in to comment.