Skip to content

Commit

Permalink
Prepare the code to remove GA
Browse files Browse the repository at this point in the history
  • Loading branch information
deedeeh committed May 20, 2024
1 parent 901e31f commit fcbad5e
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 239 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"@guardian/prettier": "4.0.0",
"@guardian/source-foundations": "14.1.4",
"@playwright/test": "1.40.1",
"@types/google.analytics": "^0.0.42",
"@types/googletag": "~3.1.3",
"@types/jest": "^29.4.0",
"@types/lodash-es": "^4.17.6",
Expand Down
7 changes: 0 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions src/core/event-timer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ describe('EventTimer', () => {
window.guardian = {
config: {
...DEFAULT_CONFIG,
googleAnalytics: {
trackers: {
editorial: 'gaTrackerTest',
},
},
},
} as typeof window.guardian;

Expand Down
114 changes: 0 additions & 114 deletions src/core/messenger/click.spec.ts

This file was deleted.

20 changes: 0 additions & 20 deletions src/core/messenger/click.ts

This file was deleted.

5 changes: 0 additions & 5 deletions src/core/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,9 @@ export type ThirdPartyTag = {

export type GetThirdPartyTag = (arg0: { shouldRun: boolean }) => ThirdPartyTag;

export type GuardianAnalyticsConfig = {
trackers: Record<string, string>;
};

export type Edition = 'UK' | 'AU' | 'US';

export type GuardianWindowConfig = {
googleAnalytics?: GuardianAnalyticsConfig;
isDotcomRendering: boolean;
ophan: {
// somewhat redundant with guardian.ophan
Expand Down
2 changes: 0 additions & 2 deletions src/init/consented/messenger.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { initMessenger } from 'core';
import { init as background } from 'core/messenger/background';
import { init as sendClick } from 'core/messenger/click';
import { init as disableRefresh } from 'core/messenger/disable-refresh';
import { init as fullwidth } from 'core/messenger/full-width';
import { init as initGetPageTargeting } from 'core/messenger/get-page-targeting';
Expand Down Expand Up @@ -28,7 +27,6 @@ initMessenger(
passbackRefresh,
resize,
fullwidth,
sendClick,
background,
disableRefresh,
passback,
Expand Down
1 change: 0 additions & 1 deletion src/init/consented/prepare-googletag.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ jest.mock('lib/detect/detect-breakpoint', () => ({
getCurrentBreakpoint: jest.fn(),
hasCrossedBreakpoint: jest.fn(),
}));
jest.mock('lib/analytics/google', () => () => void {});
jest.mock('display/display-lazy-ads', () => ({
displayLazyAds: jest.fn(),
}));
Expand Down
77 changes: 0 additions & 77 deletions src/lib/analytics/google.ts

This file was deleted.

7 changes: 0 additions & 7 deletions src/types/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,6 @@ interface PageConfig extends CommercialPageConfig {

interface Config {
frontendAssetsFullURL?: string;
googleAnalytics?: {
timingEvents?: GoogleTimingEvent[];
trackers?: {
editorial?: string;
};
};
isDotcomRendering: boolean;
ophan: {
// somewhat redundant with guardian.ophan
Expand Down Expand Up @@ -501,7 +495,6 @@ declare global {
nol_t: (pvar: { cid: string; content: string; server: string }) => Trac;

// Google
ga?: UniversalAnalytics.ga | null;
google_trackConversion?: (arg0: GoogleTrackConversionObject) => void;
google_tag_params?: GoogleTagParams;

Expand Down

0 comments on commit fcbad5e

Please sign in to comment.