Webflow sync, pageviews & more.
NEW

Track Member Logins

Example

Track Member Logins

Description

Track the number of times a user logins or logs out of their Webflow Memberstack account page. This script will allow you to update a Member field of your choosing based on the number of times they have logged into their account.

Instructions

  1. Add a a New Field on the Forms and Fields page.
  2. Update the Javascript code with the new field name
  3. Add the Javascript code to the closing body custom code section

Javascript snippet


<!-- Add to body close section -->
<script>
MemberStack.onReady.then(function(member) {
	if (member.loggedIn  == true){
		// If this is the member's first visit, then set visits=1 in metadata.  
		if (!metadata.visits){
			var memberActions = {
				visits: 1
			}
		}
		// If visits already exists, increment its value
		else {
			var oldValue = metadata.visits;
			var newValue = oldValue + 1;
			memberActions = {
				visits: newValue
			};
		}
		member.updateMetaData(memberActions)
	}
})
</script>

CSS snippet

HTML snippet

Reload Page after Form Submit

Reload Page after Form Submit

Automatically refresh your Webflow site's page after a form submit with this Javascript snippet. A great way of indicating that a form has been submitted to a user or refreshing the page for another submission.

Countdown timer

Countdown timer

Add a countdown timer to your Webflow site with this simple Javascript snippet. Want to display a countdown timer to a time of your choosing on your Webflow site? Now you can easily add one with this Javascript snippet.

Reading Time Blog/Article Page

Reading Time Blog/Article Page

Display the reading time associated with a blog or article on your Webflow site with this Javascript code. With this code you'll be able to easily add a reading time to all of your blogs or articles on your Webflow site.

Random CMS Sort on Page Load

Random CMS Sort on Page Load

Webflow's random sort feature doesn't always work. This method allows for truly random sorting of Webflow CMS items on page load.

Set referring URL as hidden input

Set referring URL as hidden input

A method to pass the referring domain/URL as a hidden field in a form in Webflow. This is perfect to know who referred the person submitted the form, or a way to display the referring domain on the page on your Webflow site.

Set URL from Tab Change

Set URL from Tab Change

Link to specific tabs using URL parameters by setting tab URLs in Webflow. This script allows you to set the tab name in the elements panel for the tabs that you want the URL to include for each tab. The URL will use the # parameter, for example something like example.com#tabName where tabName is the element ID you set on the tab. This allows you to link to specific tabs from other pages and have more control over the tab experience.

Number of CMS Item Count

Number of CMS Item Count

A simple way of displaying the number of CMS items on a page in Webflow. If you ever wanted to add a CMS item count on a page this script will allow you to easily display the total number of items shown.

Click to Copy to Clipboard

Click to Copy to Clipboard

Add a click to copy to clipboard to your Webflow site using a Javascript snippet. This copy to clipboard functionality allows you to designate the class and text that you'll allow your users to copy.

DRAG
Real-time sorting by
No items found.
DRAG
Real-time sorting by