Skip to content

Conversation

alxbridge
Copy link

No description provided.

Copy link
Member

@tomusher tomusher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

if (!hasUtmCookie(request)) {
const url = new URL(request.url);
if (STRIP_QUERYSTRING_KEYS.some((key) => url.searchParams.get(key))) {
return url.search;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't you return only the utm searchParams instead of the whole url.search? I have no idea how this cookie will be used so it might not matter too much.

let request = event.request;

// get value for setting a new UTM cookie
newUtmCookieValue = getUtmCookieValue(request);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
newUtmCookieValue = getUtmCookieValue(request);
const newUtmCookieValue = getUtmCookieValue(request);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants