FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Merge pull request #13591 from guardian/lydia-hosted-gallery · devhttps/frontend@08e482e · GitHub

Commit 08e482e

Browse files
authored
Merge pull request guardian#13591 from guardian/lydia-hosted-gallery
Hosted Gallery improve tracking
2 parents 436f724 + 4c2e6c6 commit 08e482e

8 files changed

Lines changed: 105 additions & 138 deletions

File tree

‎commercial/app/views/hosted/guardianHostedGallery.scala.html‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ <h3 class="hosted-gallery__sub-heading">{page.standfirst}</h3>
1717
</div>
1818
}.toString)
1919
@for(i <- page.images.indices.tail) {
20-
@guardianHostedGalleryImage(page.images(i), if (i == page.images.length - 1) {
21-
guardianHostedGalleryOj(page.ctaText, page.ctaLink, page.ctaButtonText, page.nextGalleries).toString
22-
} else if (page.ctaIndex.contains(i)) {
23-
guardianHostedGalleryCta(page.ctaText, page.ctaLink, page.ctaButtonText).toString
24-
} else "")
20+
@guardianHostedGalleryImage(page.images(i))
2521
}
2622
</div>
2723
<div class="hosted-gallery__scroll-container js-hosted-gallery-scroll-container">

‎commercial/app/views/hosted/guardianHostedGalleryCta.scala.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@{ctaText}
55
</div>
66
<a class="hosted-gallery__cta-link" href="@{ctaLink}" target="_blank" data-link-name="@{buttonText}">
7-
@{buttonText} @fragments.inlineSvg("arrow-right", "icon")
7+
@{buttonText} @fragments.inlineSvg("external-link", "icon")
88
</a>
99
</div>
1010

‎commercial/app/views/hosted/guardianHostedGalleryImage.scala.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@import model.ImageAsset
55
@import com.gu.contentapi.client.model.v1.Asset
66
@import com.gu.contentapi.client.model.v1.AssetType
7-
@(image: HostedGalleryImage, content: String)
7+
@(image: HostedGalleryImage, content: String = "")
88
<div class="js-hosted-gallery-image hosted-gallery__image hosted-tone--dark">
99
<div class="hosted-gallery__image-sizer js-hosted-gallery-image-sizer">
1010
@fragments.image(

‎commercial/app/views/hosted/guardianHostedGalleryOj.scala.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@{ctaText}
77
</div>
88
<a class="hosted-gallery__cta-link" href="@{ctaLink}" target="_blank" data-link-name="@{buttonText}">
9-
@{buttonText} @fragments.inlineSvg("arrow-right", "icon")
9+
@{buttonText} @fragments.inlineSvg("external-link", "icon")
1010
</a>
1111
</div>
1212
@for(gallery <- nextGalleries){

‎common/app/common/commercial/hosted/HostedGalleryPage.scala‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ case class HostedGalleryPage(
4242
"keywords" -> JsString(keywordName),
4343
"toneIds" -> JsString(toneId),
4444
"tones" -> JsString(toneName),
45+
"trackingPrefix" -> JsString(s"Hosted:GFE:gallery:$pageName:"),
4546
"images" -> JsArray(images.map((image) => JsString(image.url))),
4647
"ctaIndex" -> JsNumber(ctaIndex.map(BigDecimal(_)).getOrElse(BigDecimal(images.length - 1)))
4748
),

‎common/app/common/commercial/hosted/hardcoded/VisitBritainHostedPages.scala‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,11 @@ object VisitBritainHostedPages {
194194
val activitiesGallery: HostedGalleryPage = HostedGalleryPage(
195195
campaign = campaign,
196196
images = activityImages,
197-
pageUrl = "https://www.theguardian.com/commercial/advertiser-content/visit-britain/activities",
197+
pageUrl = "https://www.theguardian.com/advertiser-content/visit-britain/activities",
198198
pageName = activitiesPageName,
199199
title = "Don’t be a sloth this summer",
200200
ctaText = "Explore our collection of unique experiences from all over Great Britain.",
201-
ctaLink = "https://en.omgb.com/map/",
201+
ctaLink = "http://en.omgb.com/map/",
202202
ctaButtonText = "Visit OMGB now",
203203
nextGalleryNames = List(cityPageName, coastPageName),
204204
standfirst = "Get your heart pumping with a daring dip in the Lake District or learn how to paddleboard along the Isle of Wight’s scenic coastline."
@@ -207,11 +207,11 @@ object VisitBritainHostedPages {
207207
val cityGallery: HostedGalleryPage = HostedGalleryPage(
208208
campaign = campaign,
209209
images = cityImages,
210-
pageUrl = "https://www.theguardian.com/commercial/advertiser-content/visit-britain/city",
210+
pageUrl = "https://www.theguardian.com/advertiser-content/visit-britain/city",
211211
pageName = cityPageName,
212212
title = "Take a city break from the norm",
213213
ctaText = "Explore our collection of unique experiences from all over Great Britain.",
214-
ctaLink = "https://en.omgb.com/map/",
214+
ctaLink = "http://en.omgb.com/map/",
215215
ctaButtonText = "Visit OMGB now",
216216
nextGalleryNames = List(coastPageName, countrysidePageName),
217217
standfirst = "Discover instagrammable events like the Bristol Balloon Fiesta; theatre under the stars and hotly-tipped comedy acts at Edinburgh Fringe."
@@ -220,11 +220,11 @@ object VisitBritainHostedPages {
220220
private val coastGallery: HostedGalleryPage = HostedGalleryPage(
221221
campaign = campaign,
222222
images = coastImages,
223-
pageUrl = "https://www.theguardian.com/commercial/advertiser-content/visit-britain/coast",
223+
pageUrl = "https://www.theguardian.com/advertiser-content/visit-britain/coast",
224224
pageName = coastPageName,
225225
title = "Find cool-on-sea this summer",
226226
ctaText = "Explore our collection of unique experiences from all over Great Britain.",
227-
ctaLink = "https://en.omgb.com/map/",
227+
ctaLink = "http://en.omgb.com/map/",
228228
ctaButtonText = "Visit OMGB now",
229229
nextGalleryNames = List(countrysidePageName, activitiesPageName),
230230
standfirst = "Catch a show at an amphitheatre overlooking the Atlantic, go island hopping in sub-tropical climes and join the party at the Whitby Regatta."
@@ -233,11 +233,11 @@ object VisitBritainHostedPages {
233233
private val countrysideGallery: HostedGalleryPage = HostedGalleryPage(
234234
campaign = campaign,
235235
images = countrysideImages,
236-
pageUrl = "https://www.theguardian.com/commercial/advertiser-content/visit-britain/countryside",
236+
pageUrl = "https://www.theguardian.com/advertiser-content/visit-britain/countryside",
237237
pageName = countrysidePageName,
238238
title = "Mend your relationship with Mother Nature",
239239
ctaText = "Explore our collection of unique experiences from all over Great Britain.",
240-
ctaLink = "https://en.omgb.com/map/",
240+
ctaLink = "http://en.omgb.com/map/",
241241
ctaButtonText = "Visit OMGB now",
242242
nextGalleryNames = List(activitiesPageName, cityPageName),
243243
standfirst = "Switch off and soak up the country air as you ramble through the heather-coated North York Moors or explore the dramatic scenery of Glen Coe."

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL