Skip to content

Commit

Permalink
chore: fix not working cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammad-hashemi-deriv committed Mar 16, 2023
1 parent d547409 commit eeb27af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/scripts/cookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const shouldOverwrite = (new_utm_data, current_utm_data) => {

// If the user comes to the site for the first time without any URL params
// Only set the utm_source to referrer if the user does not have utm_data cookies stored
if (!JSON.parse(getCookie("utm_data"))?.utm_source) {
if (!current_utm_data.utm_source) {
utm_data = {
utm_source: document.referrer ? document.referrer : "null",
};
Expand Down

0 comments on commit eeb27af

Please sign in to comment.