File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 11( function ( ) {
22 const CLICK_ID = 'dub_id' ;
3- const OLD_CLICK_ID = 'dclid' ;
43 const COOKIE_EXPIRES = 90 * 24 * 60 * 60 * 1000 ; // 90 days
54 const HOSTNAME = window . location . hostname ;
65
108107 function checkCookieAndSet ( clickId ) {
109108 const { cookieOptions, attributionModel } = getOptions ( script ) ;
110109
111- const cookie = getCookie ( CLICK_ID ) || getCookie ( OLD_CLICK_ID ) ;
110+ const cookie = getCookie ( CLICK_ID ) ;
112111
113112 // If the cookie is not set
114113 // or the cookie is set and is not the same as the clickId + attribution model is 'last-click'
115114 // then set the cookie
116115 if ( ! cookie || ( cookie !== clickId && attributionModel === 'last-click' ) ) {
117116 setCookie ( CLICK_ID , clickId , cookieOptions ) ;
118- setCookie ( OLD_CLICK_ID , clickId , cookieOptions ) ;
119117 }
120118 }
121119
125123 const { apiHost, shortDomain, queryParam } = getOptions ( script ) ;
126124
127125 // When the clickId is present in the URL, set the cookie (?dub_id=...)
128- let clickId = searchParams . get ( CLICK_ID ) || searchParams . get ( OLD_CLICK_ID ) ;
126+ const clickId = searchParams . get ( CLICK_ID ) ;
129127
130128 if ( clickId ) {
131129 checkCookieAndSet ( clickId ) ;
You can’t perform that action at this time.
0 commit comments