From 2d06850c9acb075542db9a578563232e2b15643c Mon Sep 17 00:00:00 2001 From: Maxx Crawford Date: Fri, 25 Jun 2021 10:42:32 -0500 Subject: [PATCH] Add GA pings to additional events on the promo banner --- static/js/app.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/js/app.js b/static/js/app.js index 47edf2dda3..c4bedb5e9a 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -511,6 +511,7 @@ function vpnBannerLogic() { // Init: Show banner, set close button listener const vpnPromoCloseButton = document.getElementById("vpnPromoCloseButton"); + const vpnPromoCtaButton = document.querySelector(".vpn-promo-cta"); const vpnPromoFunctions = { hide: function() { @@ -521,6 +522,9 @@ function vpnBannerLogic() { }, init: function() { vpnPromoCloseButton.addEventListener("click", vpnPromoFunctions.hide); + vpnPromoCtaButton.addEventListener("click", ()=>{ + sendGaPing("VPN Promo Banner", "CTA Click", "CTA Click"); + }); vpnPromoFunctions.show(); }, setCookie: function() { @@ -531,6 +535,7 @@ function vpnBannerLogic() { show: function() { vpnPromoBanner.classList.remove("closed"); document.body.classList.add("vpn-banner-visible"); + sendGaPing("VPN Promo Banner", "Show Banner", "Show Banner"); }, };