Skip to content

Commit

Permalink
Add GA pings to additional events on the promo banner
Browse files Browse the repository at this point in the history
  • Loading branch information
maxxcrawford committed Jun 25, 2021
1 parent 9738c1a commit 2d06850
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions static/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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() {
Expand All @@ -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");
},
};

Expand Down

0 comments on commit 2d06850

Please sign in to comment.