File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -58,10 +58,11 @@ document.addEventListener("DOMContentLoaded", function () {
5858 if ( typeof _paq === "undefined" ) {
5959 return ;
6060 }
61+ var pageName = window . location . pathname . split ( "/" ) . filter ( Boolean ) . pop ( ) || "faq" ;
6162 document . querySelectorAll ( "aside.faq .menu-list > li > a" ) . forEach ( function ( link ) {
6263 link . addEventListener ( "click" , function ( ) {
6364 var linkText = link . textContent . trim ( ) ;
64- _paq . push ( [ "trackEvent" , "FAQ" , "Open " , linkText ] ) ;
65+ _paq . push ( [ "trackEvent" , pageName , "open-faq " , linkText ] ) ;
6566 } ) ;
6667 } ) ;
6768} ) ;
Original file line number Diff line number Diff line change @@ -86,10 +86,11 @@ document.addEventListener("DOMContentLoaded", function () {
8686 if ( typeof _paq === "undefined" ) {
8787 return ;
8888 }
89+ var pageName = window . location . pathname . split ( "/" ) . filter ( Boolean ) . pop ( ) || "modal" ;
8990 document . querySelectorAll ( "a.open-modal" ) . forEach ( function ( link ) {
9091 link . addEventListener ( "click" , function ( ) {
9192 var linkText = link . textContent . trim ( ) ;
92- _paq . push ( [ "trackEvent" , "Feature" , "Modal " , linkText ] ) ;
93+ _paq . push ( [ "trackEvent" , pageName , "open-modal " , linkText ] ) ;
9394 } ) ;
9495 } ) ;
9596} ) ;
You can’t perform that action at this time.
0 commit comments