Skip to content

Commit

Permalink
Remove BoostGAUserTimingFidelity switch and unused code related to GA
Browse files Browse the repository at this point in the history
  • Loading branch information
deedeeh committed May 30, 2024
1 parent a914dd9 commit 6917c74
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 34 deletions.
11 changes: 0 additions & 11 deletions applications/app/views/videoEmbed.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,6 @@
config: @Html(templates.js.javaScriptConfig(model.SimpleContentPage(video)).body),
adBlockers: { onDetect: [] }
};
@* Decide the Ophan PV ID here so we can share it with Google Analytics *@
guardian.config.ophan = {
// This is duplicated from
// https://github.com/guardian/ophan/blob/master/tracker-js/assets/coffee/ophan/transmit.coffee
// Please do not change this without talking to the Ophan project first.
pageViewId: new Date().getTime().toString(36) + 'xxxxxxxxxxxx'.replace(/x/g, function () {
return Math.floor(Math.random() * 36).toString(36);
})
};
@* Find the Ophan browser ID as well, for sharing with GA *@
@Html(templates.inlineJS.nonBlocking.js.ophanConfig().body)

var docClass = document.documentElement.className;

Expand Down
10 changes: 0 additions & 10 deletions common/app/conf/switches/MonitoringSwitches.scala
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ trait MonitoringSwitches {
exposeClientSide = false,
)

val BoostGAUserTimingFidelity = Switch(
SwitchGroup.Monitoring,
"boost-ga-user-timing-fidelity",
"CAUTION: check with [email protected] before enabling. Extends the standard 0.1% sampling of user timing events on Google Analytics to 100%. Will send a LOT more events to GA, which costs $$$.",
owners = Seq(Owner.withName("unknown")),
safeState = Off,
sellByDate = never,
exposeClientSide = true,
)

val LogRemovedAmpElements = Switch(
SwitchGroup.Monitoring,
"log-removed-amp-elements",
Expand Down
4 changes: 0 additions & 4 deletions common/app/dev/DevParametersHttpRequestHandler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ class DevParametersHttpRequestHandler(
"dll", // Disable lazy loading of ads
"iasdebug", // IAS troubleshooting
"cmpdebug", // CMP troubleshooting
"utm_source", // Google Analytics source
"utm_medium", // Google Analytics medium
"utm_campaign", // Google Analytics campaign
"utm_term", // Google Analytics term
"sfdebug", // enable spacefinder visualiser. '1' = inline ads (first pass), '2' = inline ads (second pass), 'im' = inline merchandising ads, 'carrot' = carrot ads
"rikerdebug", // enable debug logging for Canadian ad setup managed by the Globe and Mail
"forceSendMetrics", // enable force sending of commercial metrics
Expand Down
7 changes: 0 additions & 7 deletions common/app/model/meta.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import conf.Configuration
import conf.cricketPa.CricketTeams
import model.liveblog.Blocks
import model.meta.{Guardian, LinkedData, PotentialAction, WebPage}
import org.apache.commons.lang3.StringUtils
import org.joda.time.DateTime
import com.github.nscala_time.time.Implicits._
import play.api.libs.json._
Expand Down Expand Up @@ -451,12 +450,6 @@ case class MetaData(
.getOrElse(Nil)

def iosId(referrer: String): Option[String] = iosType.map(iosType => s"$id?contenttype=$iosType&source=$referrer")

/**
* Content type, lowercased and with spaces removed.
* This is used for Google Analytics, to be consistent with what the mobile apps do.
*/
def normalisedContentType: String = StringUtils.remove(contentType.map(_.name.toLowerCase).getOrElse(""), ' ')
}

object Page {
Expand Down
1 change: 0 additions & 1 deletion common/app/navigation/helpers/UrlHelpers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ object UrlHelpers {

import io.lemonlabs.uri.typesafe.dsl._

// INTCMP is passed as a separate param because people look at it in Google Analytics
// It's set to the most specific thing (componentId) to maximise its usefulness
val url = destination.url ? ("INTCMP" -> componentId) & ("acquisitionData" -> acquisitionData.toString)
Url.parse(url.toString).toString
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ try {
return decodeURIComponent(atob(str.replace(/-/g, '+').replace(/_/g, '/').replace(/,/g, '=')));
}

// Short version of cookie.get(), inspired by Google Analytics' code
// Short version of cookie.get()
var cookieData = (function(a) {
var d = new window.Array(),
e = new window.Array();
Expand Down

0 comments on commit 6917c74

Please sign in to comment.