Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare the code to remove GA #1392

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading