SA5 | Sygnal Attributes | Designed for Webflow
Buy Us a Beer!Community ForumMicro-Consulting
  • ➡️Github Repo
  • 👫Sygnal Attributes Community
  • 📘Overview
    • Sygnal Attributes v5
    • How to Add Custom Code
    • What is Sygnal Attributes?
    • Sponsor a Feature ✨
    • What's New?
    • Library Modules
    • Technical Notes & Goals
      • CSS Media Queries
      • Callback Handlers
      • Custom Attributes
    • Documentation
    • Configuration Blocks
      • Configuration Block Specification
    • Preloaders
    • Breakpoints
    • Component Support 🧪
    • Sygnal Attributes ( SA5 ) Support
    • Dev Team Notes
    • GDPR
    • SA6
    • Triggers, Events & Actions
      • Triggers
        • Click Triggers
        • Scroll Into View Trigger
        • Hover Trigger
        • Timer Trigger
        • Form Triggers 🧪
          • Form Submit Trigger 🧪
        • Exit Intent Trigger 🧪
        • ECommerce Triggers 🧪
        • Inactivity Trigger 🧪
        • Page Load Trigger 🧪
        • Url Hash Trigger 🧪
        • Gated Trigger 🧪
        • Link Triggers 🧪
        • Reactiv Triggers 🧪
        • Interaction Trigger 🧪
      • Events
        • Namespacing
        • Event Data
        • Link-Based Triggers 🧪
        • Breakpoints 🧪
        • Persistent Events 🧪
        • Gated Events 🧪
      • Actions
        • Click Actions
        • Alert Action
        • Visibility Actions
        • Scroll Into View Action
        • Video Actions 🧪
        • Audio Action 🧪
        • Class Adder Actions 🧪
        • Tab Element Actions 🧪
        • Interaction Actions 🧪
        • Form Actions 🧪
        • Navigate Actions 🧪
        • Script Actions 🧪
    • SA5 Core
      • Handlers
      • Controllers
      • Core Processing
      • Core Technical Notes
        • Element Tracking
  • 📘sa5-cache
    • 🔍About SA5's Cache Lib
    • Data Caching ❺
      • Cache Setup v4
  • 📘sa5-socialshare
    • 🔍About SA5's Social Share Lib
    • 🚀Quick Start | SA5 Social Share
    • Email Social Share ❺
  • 📘sa5-detect 🧪
    • 🔍About SA5's Detect Lib
    • 🚀Quick Start | SA5 Detect
    • Page
    • User Agent Detection
    • Geolocation Detection 🧪
      • Cache Setup v4
    • Detect Incognito Mode
  • 📘sa5-analytics
    • 🔍About SA5's Analytics Lib
    • 🚀Quick Start | SA5 Analytics
    • A/B and Multivariate Testing
    • UTM Tracking
    • Rel Attributes
    • GA Events
    • GTM Events ❺🧪
      • Important dataLayer Notes
      • Facebook
      • Google Analytics ( GA4 )
      • Future
  • 📘sa5-data
    • 🔍About SA5's Data Lib
    • 🚀Quick Start | SA5 Data & Data-Binding
    • Usage Notes
    • Concepts & Terminology
      • Data Paths
      • Complex Data Sources
      • Developing Concepts 📝
    • Data Sources ( Simple )
      • URL Querystring Data Source
      • URL Part Data Source
      • User Info Data Source
      • Cookies & Web Storage Data Sources 📝
      • Global Data Source 🧪
    • Data Sources ( Complex )
      • RichText Data Source 🧪
      • Defining Custom Data Sources
      • Collection List Data Source 📝
        • Developing Concepts | Collection List Data Sources
    • Data Binding
      • Conditional Visibility
      • Form Elements 📝
      • Templates & Macro Expansion 📝
      • Developing Concepts on Data-Binding 📝
      • Macro Expansion
        • Macro Expansion
        • Count Items
      • Preloaders
    • SA5 Data ( HSON ) ❺🧪
      • SA5 Data BETA Kit
      • JSON Data Variants
    • Advanced Use
    • SA5 Data JS API
    • Future 📝
      • External Data
      • One-Way v. 2-way Bindings
      • Reactive Bindings
      • Data Sources ( External ) 🧪
        • Google Sheets Data Source ⛔
        • GitHub Data Data Source ⛔
  • 📘sa5-forms
    • 🔍About SA5's Forms Lib
      • SA5 Forms Roadmap
    • 🚀Quick Start | SA5 Forms
      • SA5 Forms Future
    • Data-binding Form INPUTs & SELECTs ❺
    • Smart Form Webhook Handler ❺
      • Form Webhook Handler JS API Events
      • n8n Handler
      • ▶️Basin Handler
        • File Uploads
        • Future
      • ▶️Make ( Integromat ) Handler
      • Future
    • Form Data Validation
      • Invalid Field Indicators (Real-Time) 🧪
      • Invalid Field Indicators on Submit Attempt 🧪
      • Email validation
    • Remove Unchecked Checkboxes ✨
    • Preserve Line Breaks
    • Form IP Info ❺
    • File Uploads 📝
    • Custom Form Submit Button
    • File Downloads
    • Form Select Element
    • SA5 Forms API
    • Dynamic Forms
    • Form Success Redirect 🧪
    • Show / Hide Password 🧪
  • 📘sa5-html
    • 🔍About SA5's HTML Lib
      • Webflow Interactions
    • 🚀Quick Start | SA5 HTML
    • Advanced Element Sorting ❺
    • Advanced Element Filtering ❺
      • Useful Filtering Examples
    • Dynamic URLs 🧪
      • Future
    • Dynamic Attributes
      • Future
        • Smart Attributes 🧪
        • Prefix, Postfix, and Formatted Attributes 🧪
    • Scroll to Section
    • Breakpoints ❺
    • Limit Items by Breakpoint ❺
      • Designer CSS Embed
    • Limit Items to Multiple-of ❺
    • Numeric Sequencing ❺
    • Truncate Text w/ Ellipsis ❺
    • Encoded Email
    • Hide Section w/ Empty Collection Lists ❺
    • Download File ❺
    • Decode HTML ❺
    • Markdown ❺
      • Themes
    • Transform ❺🧪
    • Code Formatting ❺🧪
    • CMS Code Injection ❺🧪
    • Responsive Tables ❺🧪
    • Text Formatting ❺🧪
    • Components ❺🧪
      • Component Object Positioning
    • Auto-Size IFRAMEs 🧪
    • Switch Case ❺🧪
    • Lazy Load
    • Gallery 🧪
    • Scroll Anchor
  • 📘sa5-layout
    • 🔍About SA5's Layout Lib
      • Future
    • 🚀Quick Start | SA5 Layout Lib
    • Layout ❺
      • Tabs Layout Handler
      • Slider Layout Handler 🧪
      • Future
    • Element Groups ❺🧪
    • Equal Height Rows ❺🧪
  • 📘sa5-logic 🧪
    • 🔍About SA5's Logic Lib
      • Future
    • 🚀Quick Start | SA5 Logic Lib
    • If ❺🧪
    • Switch ❺🧪
  • 📘sa5-booking
    • 🔍About SA5's Booking Lib
    • 🚀Quick Start | SA5 Booking Lib
    • GetTimely ❺🧪
    • SimplyBook ❺🧪
  • 📘sa5-richtext
    • 🔍About SA5's Rich Text Lib
      • Future
    • 🚀Quick Start | SA5 Rich Text
    • Nested Lists ❺
      • Legacy Feature Notes
    • GitHub Gists ❺
      • ▶️Video Tutorials
      • Why Gist?
      • Technical Notes
      • Future
    • Code Blocks 🧪
      • Wrapping Code Blocks
      • Copy Code to Clipboard
    • Excalidraw ( SVG Embeds )
    • URL Expanders 🧪
    • Annotations 🧪
    • Text SPAN Formatting 🧪
    • Lightboxes 🧪
      • Future
    • Embeddables
    • Richtext ❺🧪
      • CSS Isolation
    • Blockquotes
    • Call-Outs
    • Responsive Inline Images
  • 📘sa5-table
    • HTML Tables
  • 📘sa5-kiosk 🧪
    • 🔍About SA5's Kiosk Lib
    • 🚀Quick Start | SA5 Kiosk
    • Usage Notes
    • Kiosk Hardware & Browser Setup
    • Kiosk Base 🧪
    • Inactivity Timer
    • Display Mode
    • Technical Notes
    • Future
      • Smart Watch Notes
    • ToDo
  • 📘sa5-hotkeys
    • 🔍About SA5's Hotkeys Lib
    • 🚀Quick Start | SA5 Hotkeys
    • Hotkeys ❺
      • Future
  • 📘sa5-commerce
    • Payment Providers
    • Price in Local Currency 🧪
  • 📘sa5-demo
    • Webflow Preview Link
  • 📘sa5-ui
    • 🔍About SA5's UI Lib
    • 🚀Quick Start | SA5 UI
    • 5-Star Ratings Component ❺
  • 📘sa5-cro
    • 🔍About SA5's CRO Lib
    • 🚀Quick Start | SA5 CRO
    • Conversion Tracking Event
  • 📘sa5-url
    • 🔍About SA5's Url Lib
    • 🚀Quick Start | SA5 Url
    • Query Param Passthrough
      • Future
    • External Link Targeting
    • Relative Link Fixups ⛔
  • 📘sa5-video
    • 🔍About SA5's Webflow Video Lib
    • 🚀Quick Start | SA5 Video
    • Background Video Poster
    • Triggers, Events & Actions
    • YouTube Hide Related Videos [BETA]
      • Styling Options
      • Future
    • Media Pop-Ups 🧪
    • Video Player ( Direct )
    • Video Controller File Format
    • Media Controller
    • Video Player Controller
      • Video Playback Spec 🧪
      • YouTube Video Data 🧪
      • Loom Video Data 🧪
  • 📘sa5-elements
    • 🔍About SA5's Elements Lib
      • Elements Lib Future Plans
    • 🚀Quick Start | SA5 Elements
    • Element Actions 🧪
    • Tabs Element
      • Tabs Future Plans
      • Triggers, Events & Actions 🧪
      • Tabs API
    • Slider Element
      • Triggers, Events & Actions 🧪
      • Slider JS API
      • Slider JS API Events
      • Advanced Slider Use
      • Future
    • Deck Controller Element ⛔
    • Button Element
      • Triggers, Events & Actions 🧪
    • Dropdown Element
      • Triggers, Events & Actions 🧪
      • Future
    • Lightbox Element
      • CMS Lightbox + Groups
      • CMS Lightbox + Captions
        • Popular Lightbox Setups
      • Lightbox JS API
      • Triggers, Events & Actions 🧪
      • SA5 Lightbox Future
    • Radio Button Element 🧪
      • Triggers, Events & Actions 🧪
    • Autocomplete Element
      • Styling
      • Future
    • Accordion Element
      • Accordion Future Plans
      • Triggers, Events & Actions 🧪
      • Accordion API
    • Lottie Element ❺🧪
      • Triggers, Events & Actions 🧪
    • Locale Switcher Element ❺🧪
      • Technical Notes
      • JavaScript API
  • 📘sa5-format
    • 🔍About SA5's Format Lib
    • 🚀Quick Start | SA5 Format
    • Format Numbers & Currencies ❺
    • Format Dates ❺
      • Use Cases
        • Custom Format a Date
        • Localize a Date
        • From and To Relative Timespans
        • Age
      • Future - Date formatting
      • Setup Your Date Field for Good Parsing
  • 📘sa5-user-accounts
    • 🔍About SA5's Webflow User Accounts Lib
    • 🚀Quick Start | SA5 User Accounts
    • Logged-In User Info ❺
      • Custom User Fields
      • Webflow's UserID
      • Access Groups
        • Using Access Groups for Conditional Visibility
        • Using Access Groups for Routing ❺🧪
      • The User object
        • The User Object Lifecycle
      • Tips & Best Practices
      • User Info FAQs
      • Troubleshooting
      • ⏩Future Plans & Ideas
      • BETA testing
      • Technical Notes - Interfaces
      • Future Development
    • Advanced Log-In & Sign-Up Flow ❺
    • Conditional Element Display ❺
    • Expand Login Button ❺
  • 📘sa5-track
    • 🔍About SA5's Tracking Lib
    • 🚀Quick Start | SA5 Tracking
    • Webflow Cookies & Storage Tracking ❺
      • Conditional Element Visibility
      • Tracking Page Visits
      • Tracking Button Clicks
      • Track Query String Params
      • Track Checkbox State
      • Cloneable Demo
    • SA5 Referer Tracking ❺🧪
    • Future Plans
      • Likes & Favorites Tracking ❺🧪
      • Recently Viewed Tracking ❺🧪
  • 📘sa5-modals
    • 🔍About SA5's Webflow Modals & Popups Lib
    • 🚀Quick Start | SA5 Modals & Popups
    • Webflow Popups & Modals
      • Triggers
      • Gating Modals
      • Modal Design & Styling Notes
      • Simple Modals v. Custom Modals
      • Modal JS API
      • Page-Specific Modal Control
      • Common Configurations
      • Pro-Tips
      • SA5 Modals Roadmap & Future
        • Future Attributes
        • Future Triggers
    • Dismissible Elements
    • Triggers, Events & Actions 🧪
    • Webflow Modals & Popups Auto-Open and Auto-Close
    • Side Panels 🧪
  • 📘sa5-selectcustom
    • 🔍About SA5's Custom Form Select Lib
    • 🚀Quick Start | SA5 Custom Form Select
    • Triggers, Events & Actions 🧪
    • Custom Form Select ❺🧪
  • 📘sa5-gallery
    • 🔍About SA5's Gallery Lib
    • 🚀Quick Start | SA5 Gallery
    • Gallery ❺🧪
      • Simple Collage Layout Engine
  • 📘sa5-effects
    • 🔍About SA5's Effects Lib
    • 🚀Quick Start | SA5 Effects
    • Depthmap (Fake 3D) Image ❺🧪
    • Image Zoom
  • 📘sa5-fixup
    • Viewport META
    • Webflow Fixups ❺
  • 📘sa5-countup
    • CountUp Animated Numbers
  • 📘sa5-seo
    • 🔍About SA5's SEO Lib
    • 🚀Quick Start | SA5 SEO
    • Noindex ❺🧪
    • Nofollow ❺🧪
    • JSON-LD ❺🧪
      • JSON-LD Article ❺🧪
      • JSON-LD Video ❺🧪
      • JSON-LD Course Info ❺🧪
      • JSON-LD WebPage
      • JSON-LD Sitelinks Searchbox ❺🧪
  • 📘sa5-core
    • SA5 Core ❺
    • Webflow Designer Support ❺
  • 📘sa5-embeds
    • 🔍About SA5's Embeds Lib
    • 🚀Quick Start | SA5 Embeds
    • Table Embeds ❺
      • Google Doc Table Embeds
        • Styling Table Embeds
      • Google Sheets Table Embeds
      • Future
  • 📘sa5-state
    • 🔍About SA5's State Lib
    • 🚀Quick Start | SA5 State
    • State ❺🧪
      • State Handlers
        • SA5 State Handler
        • MobX
        • Redux
  • 📘sa5-localization
    • 🔍About SA5's Localization Lib
    • 🚀Quick Start | SA5 Localization
    • Localization Functions
    • Locale URLs
    • Sort locales in the order you choose
  • 📘sa5-404
    • 🔍About SA5's 404 Lib
    • 🚀Quick Start | SA5 404
    • 404 Smart Search ❺
  • 📘sa5-calc
    • 🔍About SA5's Calc Lib
      • Future
    • 🚀Quick Start | SA5 Calc
    • Count & Sum Items ❺
      • Source Types
      • Calc Use Cases
  • 📘sa5-trigger ⛔
    • 🔍About SA5's Trigger Lib
    • 🚀Quick Start | SA5 Trigger
    • IX Triggers ( Legacy ) ❺
  • 📘Deprecated Features
    • Repeater ⛔
    • Lipsum Generator ⛔
    • JSON Formatter ⛔
Powered by GitBook
On this page
  • Demonstration
  • Accessing User Information
  • Data Binding
  • Accessing the User object in JavaScript
  • Usage Notes
  • Data Security
  • Personally Identifiable Information ( PII )
  • Future
  • Getting Started ( NOCODE )
  • STEP 1 - Add the Library
  • STEP 2 - Use the wfu-bind attribute to automatically load data into DOM elements
  • STEP 3 - ( OPTIONAL ) Add custom code to use User Info specially

Was this helpful?

  1. sa5-user-accounts

Logged-In User Info ❺

In Webflow Memberships, get details of the currently logged-in user, anywhere in your site.

Last updated 6 months ago

Was this helpful?

Questions? Comments? Suggestions? Join the on discourse.

NOTE: because User Info is a complex module in Sygnal Attributes, documentation is split in to several pages. Make sure to find and expand this item in the left-side nav, and explore the sub-pages below this one, they contain important configuration information.

One of the most sought-after capabilities in Webflow User Accounts is the ability to access information about the currently logged in user, anywhere in your site.

Use cases include;

  • Personalize your site by displaying the user's name in the top navigation of all pages

  • Auto-fill the logged-in user's email in a form email field, so they don't have to type it every time.

  • Have a unique identifier for the user, for integrating into external systems via logic, script, or automation.

  • Use custom user field data anywhere in your site to personalize their experience... favorite color, darkmode, calculations based on their age, or gender... whatever you like.

  • Customize any page of your site to specific access groups, so that certain elements only appear to those who should see them.

Features;

  • Get the current user's email, name, and marketing opt-in status

  • Get the Webflow UserID ( experimental ).

  • Get an additional unique, User-specific alternate ID which can be used for system integrations

  • Get

  • Get

  • Heavily optimized, with a multi-layered, asynchronous load approach to assembling the user data.

Limitations;

  • For custom user fields, the File field type is unsupported for now

  • Currently this library depends on the User Account screen in order to access user data and compose the user object. You can do what you want with your User Account page however those user fields must exist in the page ( even hidden ) in order for this library to work.

  • Read-only. The library is designed to read user data, but not to update it.

Demonstration

Here's a new cloneable, specific for SA5-

Accessing User Information

When a user is logged in, the User Info is constructed and the object contains this information;

  • name - The user's name, as they've specified in account info

  • email - The user's email address

  • name_short - A pseudonym, composed from the email's name@ portion

  • name_short_clean - The name_short pseudonym, without the @

  • name_short_tcase - The name_short_clean pseudonym, title cased

  • user_id - EXPERIMENTAL. The Webflow user ID.

  • user_id_alt - A unique ID for the User. This is not the Webflow Membership's ID, and cannot be used with Webflow's API - but is equally usable for 3rd party system integration and tracking.

  • data - A map of the user's custom fields. These are named using Webflow's internal data field names, which is based on your individual user field slugs.

Any of these can be accessed directly from the User object, which is provided in the callback function as soon as it is available.

Data Binding

You can automatically data-bind user information to any element you like, using custom attributes.

Simply use the wfu-bind custom attribute, with $user. and the value you want.

For example;

  • To data-bind the User's email address to an input field, add the custom attribute; wfu-bind = $user.email

  • To data-bind the User's name to a text field, add the custom attribute; wfu-bind = $user.name

  • To data-bind a custom user field, named City ( slug city ), add the custom attribute; wfu-bind = $user.data.city

The $user convention is used only in the wfu-bind custom attribute. If you want to access the user object in JavaScript, see the next section.

Accessing the User object in JavaScript

If you want to access the user object in code, you can do this most easily in the callback function, where the user object is already passed. Here you know the user object has been initialized and contains data, so it's the best place to access it.

<script>
window.sa5 = window.sa5 || [];
window.sa5.push(['userInfoChanged', 
  (user) => {
    console.log("USER INFO CHANGED", user); 
  }]); 
</script> 

Usage Notes

Drop in the script below. User information loads automatically, and asynchronously.

If a user is logged in, any data-bound fields will be populated automatically. Your callback JS function will be also called, and you can do what you want with the user's available info in script.

IMPORTANT: This library depends on Webflow's User Account page ( at/user-account ) as the mechanism to access and load User data.

If you have removed any fields or need to add custom fields, you can add these in using the right side designer menu when the form is selected on the User Account page.

Data Security

We protect user data. We consider all user data to be sensitive and it's important to treat it carefully.

Even basic contact information should never be kept in the browser cache longer than necessary. To maximize security, we build the user information object on first request, and then dispose of it as soon as the browser tab is closed.

In our testing, this gives the best user data security, while maximizing your site's performance- both of which are primary concerns for us and our clients.

Questions? Let us know - attr@sygnal.com.

Personally Identifiable Information ( PII )

In Webflow Memberships, the only unique, persistent identifier we have access to client-side is the user's email address, which can not be changed.

However as this absolutely qualifies as PII, we do not want to use this as an identifier for integrating with other external systems.

To provide for this, we manufacture an Alt User ID as a one-way hash of the user's email. Use this when you need to "attach" data in an external system.

Future

  • Callback on login

    • Login on external system, retrieve data

  • Callback on first login

    • Setup account on external system

  • Inactivity logout timer settings

  • Login activity logging

Getting Started ( NOCODE )

IMPORTANT: If you are upgrading from SA4, it's important to note that the code is now completely different and much simpler.

  • It's now in the site-wide before HEAD rather than the before BODY code area

  • You no longer include the data-binding library

  • You do not need to initialize the data-binding library

  • The script is no longer type=module, and it needs defer

Don't blindly copy and paste URLs, you're much better to copy the code block here, and replace the old one directly. If you are using the custom callback feature, it is redesign as well, see STEP 3 for that new code.

STEP 1 - Add the Library

STEP 2 - Use the wfu-bind attribute to automatically load data into DOM elements

SA5's Data-Binding feature can access logged-in user info as well, and you can easily data-bind it to text elements, titles, spans, form INPUT elements, and more. You can use this to, for example, automatically populate a form field with the logged-in User's email address.

See above for details.

STEP 3 - ( OPTIONAL ) Add custom code to use User Info specially

Place this also in the before HEAD of your site, just after the library code above. If it's page-specific, you can instead place it on the before HEAD of specific pages if you like.

<!-- Sygnal Attributes 5 | Memberships | User Info Changed Event -->
<script>
window.sa5 = window.sa5 || [];
window.sa5.push(['userInfoChanged', 
  (user) => {
    console.log("USER INFO CHANGED", user); 
  }]); 
</script> 

You should be able to have multiple instances of this code block, for example site-wide, and page specific, at the same time - however this has not been production tested. Test it carefully if you want to experiment with this approach.

All basic user info fields MUST exist, including Name, Email, and the Opt-in checkbox. These fields may be hidden, but they MUST exist in the page. Custom User Data fields must also exist if you want them, see for details.

First, add the library as detailed in .

📘
Sygnal Attributes forum
custom user fields
access groups
Custom User Fields
Quick Start
Get the Current User's Info in Memberships - WebflowGet the Current User's Info in Memberships
Logo