File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -77,3 +77,7 @@ favicon: ./images/favicon.ico
7777analytics :
7878 ga4 :
7979 measurement-id : G-326708547
80+
81+ js :
82+ - path : ./js/analytics-enterprise-cta.js
83+ strategy : afterInteractive
Original file line number Diff line number Diff line change 1+ document . addEventListener ( 'DOMContentLoaded' , function ( ) {
2+ const links = document . querySelectorAll ( 'a[href^="https://humansignal.com/goenterprise"]' ) ;
3+ if ( links . length === 0 ) {
4+ return ;
5+ }
6+ links . forEach ( ( link , index ) => {
7+ link . addEventListener ( 'click' , function ( ) {
8+ if ( typeof gtag === 'function' ) {
9+ gtag ( 'event' , 'enterprise_cta_click' , {
10+ button_index : index ,
11+ button_text : link . innerText || '' ,
12+ target_url : link . href ,
13+ page_path : window . location . pathname
14+ } ) ;
15+ }
16+ } ) ;
17+ } ) ;
18+ } ) ;
19+
You can’t perform that action at this time.
0 commit comments