Any way to set up server-side cookie w/Webflow hosting?

I need to integrate some third party tracking code that requires a cookie to be created on the server. For example, when someone visits myfakesiteurl.com?secret=foo I need to create a cookie on the server with that “foo” value. Due to Apple’s ITP changes this is becoming a more common requirement for tracking and analytics solutions.

The site I’m working with is hosted using Webflow integrated hosting. Is there any way to handle server-side cookies for a site hosted w/Webflow directly?

Cookies are client side and can be created with JavaScript. Local storage is now preferred.

Apple recently made changes to their security policies so client-side cookies can’t exist longer than 7 days, which is a big issue for tracking and analytics solutions.

A popular workaround to this is setting cookies on the server side, this article goes over in more depth

I’m curious if Webflow hosting has any way to accommodate this kind of thing

Webflow does not, so your options are limited.

Hey there, I just saw this question and it might be a bit late… but I’ve been struggling with the same problem and eventually found a solution by writing the cookies 1st party server-side through google tag manager server-side

1 Like

Hey there! I’ve been trying to do this and got stuck when needing to create a server-side container URL. How did you manage to create this (automatically provisioned)?

hey there, im looking for something similar to that.
i want to save data that will match the user cart.
when i use session storage and close the window the cart is saved but the session isnt.
do you think using google tag manager will solve this? can you help me a bit with this?

Session storage is limited to the current tab, and is erased as soon as the tab is closed. If you need the data to exist on the next visit, use Local storage instead. Different object, same interface.

I built a cloneable here where you can see all 3 in action.