From 3e13e946f88aaea767c847cd95655b1d7757aa30 Mon Sep 17 00:00:00 2001 From: Dina Hafez Date: Thu, 30 May 2024 17:30:54 +0100 Subject: [PATCH] Remove all GA references in docs and the package --- common/app/model/content.scala | 1 - common/app/model/meta.scala | 4 ---- common/app/views/fragments/inlineJSNonBlocking.scala.html | 3 --- docs/02-architecture/06-client-side-architecture.md | 4 +--- package.json | 1 - yarn.lock | 8 -------- 6 files changed, 1 insertion(+), 20 deletions(-) diff --git a/common/app/model/content.scala b/common/app/model/content.scala index 5c0d429a32e..b780b41fcb0 100644 --- a/common/app/model/content.scala +++ b/common/app/model/content.scala @@ -279,7 +279,6 @@ final case class Content( def javascriptConfig: Map[String, JsValue] = Map( - ("contentId", JsString(metadata.id)), ("publication", JsString(publication)), ("hasShowcaseMainElement", JsBoolean(elements.hasShowcaseMainElement)), ("pageCode", JsString(internalPageCode)), diff --git a/common/app/model/meta.scala b/common/app/model/meta.scala index b3c7a5c70f3..3a80718e0f6 100644 --- a/common/app/model/meta.scala +++ b/common/app/model/meta.scala @@ -860,7 +860,6 @@ final case class Tags(tags: List[Tag]) { _.id } - lazy val commissioningDesks: List[String] = tracking.map(_.id).collect { case Tags.CommissioningDesk(desk) => desk } lazy val blogOrSeriesTag: Option[Tag] = { tags.find(tag => tag.showSeriesInMeta && (tag.isBlog || tag.isSeries)) } @@ -904,7 +903,6 @@ final case class Tags(tags: List[Tag]) { ), ), ("blogIds", JsString(blogs.map(_.id).mkString(","))), - ("commissioningDesks", JsString(commissioningDesks.mkString(","))), ) } @@ -959,8 +957,6 @@ object Tags { "tone/reviews", ) - val CommissioningDesk: Regex = """tracking/commissioningdesk/(.*)""".r - def make(apiContent: contentapi.Content): Tags = { Tags(apiContent.tags.toList map { Tag.make(_) diff --git a/common/app/views/fragments/inlineJSNonBlocking.scala.html b/common/app/views/fragments/inlineJSNonBlocking.scala.html index 92eb7064482..08c87b1cdab 100644 --- a/common/app/views/fragments/inlineJSNonBlocking.scala.html +++ b/common/app/views/fragments/inlineJSNonBlocking.scala.html @@ -24,9 +24,6 @@ // ************* ANALYTICS ************* -// Ophan pageview ID and browser ID are needed by Google Analytics, which runs just after this script tag -@InlineJs(ophanConfig().body, "ophanConfig.js") - @if(page.metadata.contentType.exists { c => c == DotcomContentType.Article || c == DotcomContentType.LiveBlog || diff --git a/docs/02-architecture/06-client-side-architecture.md b/docs/02-architecture/06-client-side-architecture.md index 8197893feaf..d7385255b54 100644 --- a/docs/02-architecture/06-client-side-architecture.md +++ b/docs/02-architecture/06-client-side-architecture.md @@ -153,9 +153,7 @@ Gets the [Ophan browserId](https://github.com/guardian/frontend/blob/main/common ### Analytics -The analytics for Dotcom are defined in [analytics/base.scala.html](https://github.com/guardian/frontend/blob/main/common/app/views/fragments/analytics/base.scala.html). It contains [Google Analytics](https://github.com/guardian/frontend/blob/main/common/app/views/fragments/analytics/google.scala.html), [Omniture](https://github.com/guardian/frontend/blob/main/common/app/views/fragments/analytics/omniture.scala.html) and [Comscore](https://github.com/guardian/frontend/blob/main/common/app/views/fragments/analytics/comscore.scala.html). - -[Read more about the Google Analytics implementation](https://github.com/guardian/frontend/blob/main/docs/03-dev-howtos/14-implement-google-analytics.md). +The analytics for Dotcom are defined in [analytics/base.scala.html](https://github.com/guardian/frontend/blob/main/common/app/views/fragments/analytics/base.scala.html). ### Bootstraps diff --git a/package.json b/package.json index 013181f14b2..74ff4d5db11 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,6 @@ "@guardian/source-react-components": "22.1.0", "@guardian/source-react-components-development-kitchen": "19.0.0", "@guardian/support-dotcom-components": "1.1.3", - "@types/google.analytics": "^0.0.42", "@types/googletag": "^1.1.3", "@types/jest": "29.5.12", "@types/lodash-es": "^4.17.4", diff --git a/yarn.lock b/yarn.lock index 070ef7be451..3b10ba37f01 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2805,7 +2805,6 @@ __metadata: "@guardian/source-react-components": "npm:22.1.0" "@guardian/source-react-components-development-kitchen": "npm:19.0.0" "@guardian/support-dotcom-components": "npm:1.1.3" - "@types/google.analytics": "npm:^0.0.42" "@types/googletag": "npm:^1.1.3" "@types/jest": "npm:29.5.12" "@types/lodash-es": "npm:^4.17.4" @@ -4334,13 +4333,6 @@ __metadata: languageName: node linkType: hard -"@types/google.analytics@npm:^0.0.42": - version: 0.0.42 - resolution: "@types/google.analytics@npm:0.0.42" - checksum: 10c0/7145854f12370c87547a26756e32520b019905e785d0b713ba316481e1c44bfee209fbf2f0956dc86c6531f468cb13adb71bf8117634ac401c12c5b36026c5dd - languageName: node - linkType: hard - "@types/googletag@npm:^1.1.3": version: 1.2.3 resolution: "@types/googletag@npm:1.2.3"