Skip to content

Commit

Permalink
[MIBM-253][JR] GTM (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanrowe authored Nov 24, 2020
1 parent b23a58c commit 981cd1f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

@import uk.gov.hmrc.govukfrontend.views.viewmodels.header.Header
@import uk.gov.hmrc.merchandiseinbaggage.views.html.components
@import uk.gov.hmrc.hmrcfrontend.views.html.components.HmrcReportTechnicalIssue
@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcTrackingConsentSnippet

@this(
govukTemplate: GovukTemplate,
Expand All @@ -24,6 +26,7 @@
govukBackLink: GovukBackLink,
phaseBanner: components.phaseBanner,
hmrcReportTechnicalIssue: HmrcReportTechnicalIssue,
hmrcTrackingConsentSnippet: HmrcTrackingConsentSnippet,
appConfig: AppConfig
)

Expand All @@ -39,6 +42,11 @@
maybeBackButtonUrl: Option[play.api.mvc.Call]
)(contentBlock: Html)(implicit messages: Messages, appConfig: AppConfig)

@headDefault = {
@headBlock
@hmrcTrackingConsentSnippet()
}

@headerDefault = {
@headerBlock.getOrElse {
@govukHeader(Header(
Expand Down Expand Up @@ -88,7 +96,7 @@
@govukTemplate(
htmlLang = Some(messages.lang.code),
pageTitle = pageTitle,
headBlock = headBlock,
headBlock = Some(headDefault),
headerBlock = headerDefault,
beforeContentBlock = Some(beforeContentDefault),
footerBlock = footerDefault,
Expand Down
3 changes: 1 addition & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ lazy val microservice = Project(appName, file("."))
TwirlKeys.templateImports ++= Seq(
"uk.gov.hmrc.merchandiseinbaggage.config.AppConfig",
"uk.gov.hmrc.govukfrontend.views.html.components._",
"uk.gov.hmrc.govukfrontend.views.html.helpers._",
"uk.gov.hmrc.hmrcfrontend.views.html.components._"
"uk.gov.hmrc.govukfrontend.views.html.helpers._"
),
// ***************
// Use the silencer plugin to suppress warnings
Expand Down
6 changes: 5 additions & 1 deletion conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ play.modules.enabled += "play.modules.reactivemongo.ReactiveMongoHmrcModule"

play.modules.enabled += "uk.gov.hmrc.merchandiseinbaggage.config.MerchandiseInBaggageFrontendConfigModule"

play.filters.headers.contentSecurityPolicy = "default-src 'self' 'unsafe-inline' localhost:9000 localhost:9032 www.google-analytics.com data:"
play.filters.headers.contentSecurityPolicy = "default-src 'self' 'unsafe-inline' localhost:9000 localhost:9032 localhost:12345 www.googletagmanager.com www.google-analytics.com data:"

# Play Modules
# ~~~~
Expand Down Expand Up @@ -130,6 +130,10 @@ google-analytics {
host = auto
}

tracking-consent-frontend {
gtm.container = "a"
}

contact-frontend {
host = "http://localhost:9250"
}
Expand Down
4 changes: 2 additions & 2 deletions project/AppDependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ object AppDependencies {

val compile = Seq(
"uk.gov.hmrc" %% "bootstrap-frontend-play-27" % "3.0.0",
"uk.gov.hmrc" %% "play-frontend-hmrc" % "0.17.0-play-27",
"uk.gov.hmrc" %% "play-frontend-govuk" % "0.53.0-play-27",
"uk.gov.hmrc" %% "play-frontend-hmrc" % "0.27.0-play-27",
"uk.gov.hmrc" %% "play-frontend-govuk" % "0.54.0-play-27",
"uk.gov.hmrc" %% "simple-reactivemongo" % "7.30.0-play-27",
"com.github.pureconfig" %% "pureconfig" % "0.13.0",
"com.beachape" %% "enumeratum-play" % "1.5.13"
Expand Down

0 comments on commit 981cd1f

Please sign in to comment.