Webflow Cookies & Storage Tracking ❺
Track referrals, user info and more to improve your site's user experience (UX)
Last updated
Track referrals, user info and more to improve your site's user experience (UX)
Last updated
Tracking and storage mechanisms like Cookes & Web Storage are central part of what makes the Internet work today. But all of these things require code to access.
This library makes it easier by;
Abstracting cookies & web storage, so you can switch painlessly
Providing a simple script API for those who want to add basic logic functionality in their Webflow site scripts
Providing NO CODE connections for features like conditional visibility
Generally, the tracker will be "installed" to the window object, so that it is globally-accessible. In the code examples here, you can see that in the a
convention.
To track a general event, such as when the user visited a page or clicked a button, you can just give it a memorable name, and track it;
Now, the label my-item
is tracked, and will affect things like conditional visibility of elements that are connected to it. See below.
If you want to track a specific piece of information with that label, you can add it as well. This underlies the mechanisms for tracking query string params and checkbox states, which you'll see in the subsections.
To remove something from tracking;
Sygnal Attributes has a NOCODE conditional visibility feature in the tracking library as well.
If you want an element to be visible only when a the label my-item
is tracked, add this custom attribute to that element;
Likewise, if you want an element to be hidden when a particular label is tracked, add this custom attribute to that element;
This library has configuration options, so we've taken a LOCODE approach to its design.
First, add the library as detailed in Quick Start.
Add this JS reference to the site-wide before BODY. It can be page-specific if you only capture and retrieve tracking info on specific pages.
This is the base configuration.
See above, and the feature-specific sub pages for details.