File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 146146 let clientClickTracked = false ;
147147
148148 // Track click and set cookie
149- function trackClick ( { domain, key } , serverClickId ) {
149+ function trackClick ( { domain, key } ) {
150150 if ( clientClickTracked ) return ;
151151 clientClickTracked = true ;
152152
153+ const params = new URLSearchParams ( location . search ) ;
154+ const serverClickId = params . get ( DUB_ID_VAR ) ;
155+
153156 fetch ( `${ API_HOST } /track/click` , {
154157 method : 'POST' ,
155158 headers : { 'Content-Type' : 'application/json' } ,
215218
216219 // Dub Partners tracking (via query param e.g. ?via=partner_id)
217220 if ( QUERY_PARAM_VALUE && SHORT_DOMAIN && shouldSetCookie ( ) ) {
218- trackClick (
219- {
220- domain : SHORT_DOMAIN ,
221- key : QUERY_PARAM_VALUE ,
222- } ,
223- clickId ,
224- ) ;
221+ trackClick ( {
222+ domain : SHORT_DOMAIN ,
223+ key : QUERY_PARAM_VALUE ,
224+ } ) ;
225225 }
226226
227227 // Process the queued methods
You can’t perform that action at this time.
0 commit comments