Currently somewhere in the region of 34% of websites are built with WordPress, it’s the most utilized CMS (Content Management System) in the world. Part of that popularity stems from its underlying technologies—PHP and MySQL—which allows for dynamic content in posts, but also enables a rich ecosystem of plugins.
One of the trickiest aspects of launching a website is its digital marketing, and so naturally there are a plethora of WordPress plugins that aim to take care of this for you, from a simple helping hand, all the way to full automation. Today we’re going to roundup the 10 best WordPress plugins for digital marketing.
1. Hustle
Hustle is an excellent WordPress plugin for digital marketing. It includes a wide range of features aimed at boosting site visitors and audience. Also, some of its features are designed to make your site as aesthetically appealing as possible. Hustle comes with a set of widgets, slides, pop-ups, and shortcodes among others, This allows users to set up targeted ad campaigns and expand audience reach to generate more leads.
Furthermore, the plugin provides an avenue for swift social media sharing; digital marketers can easily share their sponsored posts (or ad posts) on notable social media platforms to generate leads and facilitate client conversion.
2. ThirstyAffiliates
ThirstyAffiliates is another essential plugin for digital marketing, and it’s a perfect tool for affiliate marketers. It serves as an extension for monitoring clicks on WP platforms. Put aptly, the plugin enables you to keep track of visitors on a WordPress site.
ThirstyAffiliates is mainly known for its link management functions, as well as its redirects and uncloaking features. These typically make your site marketable, attracting affiliate marketers and bloggers alike.
3. WooCommerce MailChimp
Did you know that you can integrate MailChimp with WooCommerce? WooCommerce MailChimp makes this possible. With this integrated plugin, you can easily optimize MailChimp for your online store.
The plugin allows you to set up MailChimp subscriptions for your clients, you can streamline your workflow and send those digital marketing campaigns to your customers without hassles. Also, you are provided with the opportunity to network or connect with interest groups and like minds, via the plugin’s “opt-in” options.
4. Click To Tweet
Click To Tweet is another interesting WordPress plugin for digital marketing. Basically, this plugin creates ad boxes tagged “Click To Tweet” in your WP posts. By clicking any of the boxes, a reader can easily share the blog content with his/her Twitter followers; making your post accessible to a larger audience.
Digital marketers operate mainly on social media; hence, this plugin provides a direct, one-click, avenue to export ad-posts to Twitter. Put aptly, your audience can conveniently share your blog posts on Twitter with ease.
Click-To-Tweet boxes come in various dimensions and sizes, depending on the content, type, and length of your post.
5. Envira Photo Gallery
Envira Photo Gallery is another WP plugin for marketers. It’s primarily designed to create photo galleries in WordPress, which is essential for digital marketing.
In marketing, a picture is generally more effective than a thousand-word article. Hence, as a marketer, this plugin offers you a seamless avenue to present pictures of your goods and/or services to prospective clients.
The plugin hosts a simple, yet powerful gallery builder, using a simple drag and drop function to upload photos to the gallery. Also, you can easily add metadata and links to your images/photos, to optimize search results.
6. WPForms
A typical marketer carries out market surveys at one point or another, which can be time-consuming. However, with the WPForms plugin in WordPress, you’re duly covered.
WPForms facilitates the creation of contact forms, newsletters, and other web forms. With WPForms, you can easily create web forms, in line with your needs and your target audience. So, if you’re a digital marketer looking to create forms for a market survey, user feedback/feedback report or price comparison/analysis, WPForms is an essential plugin for you.
7. Floating Social Media Icon
Just as its name implies, Floating Social Media Icon makes your social media icons float on your WordPress website.
Successful digital marketing is one with a formidable social media presence. Although WordPress is essential for creating marketing sites and curating captivating ad-posts, you still need a link to social media to reach your target audience. Hence, this tool offers a straight-forward avenue for exporting WordPress content to social media platforms. This is achieved by creating social media links, which are then floated in distinctive locations on your site.
8. OptinMonster
Another WordPress plugin that should be considered for digital marketing is OptinMonster. This fantastic WordPress plugin has a reputation for its lead generation features which allows you to capture email and boost sign-ups.
With OptinMonster, you can create and manage signup forms that can be added after content, slide-in forms, lightbox popups, inline, and even in the sidebar. OptinMonster also comes with Exit-Intent technology which allows you to convert visitors who are about to exit your website.
9. NextScripts: Social Networks Auto-Poster
NextScripts: Social Networks Auto-Poster is another useful WordPress plugin that is aimed at promoting posts from your WordPress site to your connected social media accounts.
SNAP (short for Social Networks Auto-Poster) is fully compatible with popular social media such as Facebook, Twitter, LinkedIn, YouTube, Instagram, Telegram, Pinterest, and more.
Also, your blog posts—which are automatically shared on your social media—are 100% white labeled; you don’t have to worry about NextScripts SNAP from taking the credit.
This plugin is available in either a free or premium version. For the free version, users are limited to only 1 account per connected network e.g. you can only add 1 LinkedIn account, 1 Twitter account, etc., whereas the premium version is unlimited.
10. Sumo
Saving the best for last, Sumo is an easy-to-use comprehensive WordPress plugin ideal for digital marketers. With more than 35,000 business users, Sumo makes sales conversion easier, even for newbies.
Sumo can be utilized as an email marketing tool for growing your email list with timed popups. You can schedule email drips or marketing emails to communicate with your email list subscribers. Also, Sumo seamlessly integrates with WooCommerce – the WordPress ecommerce plugin. Hence, online store owners can reduce cart abandonment and increase order value by winning back customers.
If you are looking for a free suite of marketing tools for your upcoming WordPress design project, Sumo WordPress plugin might be all you need.
There are some new features in CSS that can assist us with building layouts for different directions and languages with ease. This article is about CSS logical properties and values (e.g. margin-inline-start). These are a W3C working draft that still going under heavy editing, but have shipped in many browsers. I want to talk about this because I’ve been using these properties for a little while and have seen a significant boost to my workflow after switching to them.
I’ll talk about the specifications and how can you use it today in your work. I live in Egypt where we use Arabic as a primary language. Arabic is written from right to left, which means Arabic websites look like a mirror image of an English version. Most of the websites we create are bilingual, which means we provide a stylesheet specific for each direction. We do that by flipping values and properties of almost everything! I will not talk in details about this part but you can talk a quick look about a past article I wrote on the topic.
It starts with declaring the dir attribute on the HTML tag.
<html dir="rtl">
This attribute accepts one of two values: ltr (which is the default value if none is specified) and rtl. According to its value, the browser starts to paint the elements following a specific algorithm. Text will be written with respect to the direction and punctuations will be placed in their correct location. Some elements, like tables, will have their direction switched (for example, a
starting from the right in rtl). Thankfully, some new specifications, like CSS Grid, and flexbox follow a similar approach to the table. That means we don’t have to change the order of anything because the browser will take care of it!
HTML5 introduced a new auto value for the dir attribute. It will check for the first character within the element and, if it belongs to a language that is written from left-to-right (like Latin characters), the element will have an ltr direction and vice versa. The W3C urges authors to avoid relying on this value to determine text direction and use a server-side solution instead.
An interesting use case for the auto value is when you’re unsure about the direction of the content, such user-generated content, like a comment thread. I see a lot of people contributing to discussions in Arabic websites in English. The support for auto is pretty good except, for Internet Explorer and Edge.
CodePen Embed Fallback
Introducing the :dir() pseudo-class
The :dir() pseudo-class is a new selector modifier that selects an element by evaluating its direction value. It works like this:
/* Select all paragraphs that have their computed direction value set to rtl */
p:dir(rtl) {
font-size: 16px; /* Sometimes Arabic glyphs need a size boost to feel right. */
}
/* Select all paragraphs that have their computed direction value set to ltr */
p:dir(ltr) {
font-size: 14px;
}
The beauty of this selector is that it’s the first one to select elements based on a computed value. Whether the direction of the element was inherited from the HTML dir attribute or set using CSS like html:lang("ar") { direction: rtl; }, the selector will match the element. Even better, if you have the direction of the element set to auto, it will still correctly the element based on its content!
<style>
p {
direction: auto;
}
p:dir(ltr) {
background: green;
}
p:dir(rtl) {
background: red;
}
</style>
<!-- The following paragraph will have a green background -->
<p>This is a paragraph that starts with a latin character</p>
<!-- The following paragraph will have a red background -->
<p>هذا النص يستخدم حروف عربية</p>
Sadly, the support for :dir() isn’t great and limited only to Firefox.
This browser support data is from Caniuse, which has more detail. A number indicates that browser supports the feature at that version and up.
Desktop
Chrome
Opera
Firefox
IE
Edge
Safari
No
No
17*
No
No
No
Mobile / Tablet
iOS Safari
Opera Mobile
Opera Mini
Android
Android Chrome
Android Firefox
No
No
No
No
No
68
Even if the browser support was great, the selector only allows you to target elements and manually apply certain styles to them. That means that we still should flip the values for everything (like margins, paddings, floats, positions, etc.) which doesn’t really enhance our workflow or reduce the effort to produce multi-directional layouts.
Introducing CSS logical properties and values
As defined by the W3C, logical properties and values provide us with the ability to control layout through logical, rather than physical, direction and dimension mappings. Let’s skip the technical jargon and jump directly to the details. These provide us with new properties and values that will evaluate differently according to certain conditions.
Logical values
Let’s say we have a paragraph that we want to align in a direction that’s opposite to the natural direction of the language. Let’s say this is in English that follows the ltr direction. We would do something like this:
<article>
<p class="opposite">
Lorem ipsum dolor sit amis ..
</p>
</article>
And the CSS file would be like this:
.opposite {
text-align: right;
}
To provide the opposite for the rtl version, we would override the selector by targeting the tag with the dir attribute, or simply provide a different file for the rtl version, like this:
html[dir="rtl"] .opposite {
text-align : left;
}
Logical properties and values were created to solve this problem. Why don’t we use values that evaluates to the correct context instead of using left and right? In an ltr element, the value left means the beginning or the start of the element while on the rtl element, the value right means the start! It’s simple, right?
So instead of what we wrote before, we can use:
.opposite {
text-align: end;
}
And that’s it! If the element’s computed direction is ltr, the text would be aligned right; and the computed direction would be opposite for the rtl elements. So, instead of using left and right values for text-align, we can simply replace it with start and end. This is a lot easier and more convenient than our previous options.
Logical properties
What we just looked at were logical values, so let’s turn now to logical properties. Logical properties are new properties that have the same idea; they evaluate differently according to the direction of the element. Take a look at margin as an example. Previously, we wanted to add some space toward the start of the paragraph. We can do so in the ltr document by using:
article img {
margin-left: 15px;
}
Now, in the case of the rtl version, we will need to add the margin to the opposite direction in addition to resetting the left value:
We can do better with logical properties. Consider the following:
article img {
margin-inline-start: 15px;
}
The -inline-start part evaluates to the beginning of the horizontal axis of the image. In the case of ltr, that means left, and in the case of rtl, that means right.
CodePen Embed Fallback
The start and end are probably obvious by now, but what is with the word inline and why do we need it? To understand it, we need to talk about something called CSS writing modes. Jen Simmons wrote an excellent article on that topic. I won’t regurgitate everything explained there, but the bottom line is that we can use writing modes to define the writing direction. Some languages, like the Chinese, Korean, and Japanese, can be written vertically from top to bottom. CSS writing modes allow us to control that flow. Take a look at the following paragraph:
You can clearly identify the top, bottom, left and right edges of the block. What will happen if we change the direction of the paragraph using CSS writing modes to flow vertically?
When we talk about the “top” of this rotated paragraph, do we mean the where the content begins or what was the right edge when it wasn’t rotated? Identifying the four directions becomes confusing. Let’s look at them from a different perspective. In “normal” writing conditions, the vertical axis will have the suffix -block and the horizontal axis will have the suffix -inline, both followed by start or end:
And if we rotate it, it should be like this:
Since we are talking about normal horizontal layout, we will be using -inline-start and -inline-end, but it is good to know about the other properties as well. We can also write logical shorthand values by using the logical keyword. Consider the following:
article img {
margin: logical 10px 20px 30px 40px;
}
The computed value of the image’s margin will be the following:
The logical keyword is an experimental feature at this point in time, which means it may change or it may be replaced by the time the spec becomes official. There’s an open discussion on the topic that you can follow in the meantime.
Logical properties also allow us to apply values to a certain axis, meaning we have margin-inline and margin-block for the horizontal and vertical axises, respectively.
Property
Logical Property
margin-top
margin-block-start
margin-left
margin-inline-start
margin-right
margin-inline-end
margin-bottom
margin-block-end
Just like with the logical margin properties, we also have logical padding properties which follow the same rules as the margin.
Property
Logical Property
padding-top
padding-block-start
padding-left
padding-inline-start
padding-right
padding-inline-end
padding-bottom
padding-block-end
Logical positioning properties
In the previous examples we were able to modify the meaning of the property by appending suffixes, but what about the positions? The properties names changed completely from what we know now as top, right, bottom, and left.
.element {
position: absolute;
inset-block-start: 0; /* evaluates to top */
inset-block-end: 0; /* evaluates to bottom */
inset-inline-start: 0; /* evaluates to left in ltr and right in rtl */
inset-inline-end: 0; /* evaluates to right in ltr and left in rtl */
}
Learning new properties and values can be hard but, hey, we get a shorthand property called inset to make it a little easier:
/* Shorthand FTW! */
.element {
position: absolute;
inset: logical 10px 20px 30px 40px;
}
/* It evaluates to this */
.element {
position: absolute;
inset-block-start: 10px;
inset-inline-start: 20px;
inset-block-end: 30px;
inset-inline-end: 40px;
}
inset supports both inset-block and inset-inline just like margin and padding.
Property
Logical Property
top
inset-block-start
left
inset-inline-start
right
inset-inline-end
bottom
inset-block-end
Logical border properties
Border properties can also become logical by appending the -inline-start and -block-start.
Property
Logical Property
border-top{-size|style|color}
border-block-start{-size|style|color}
border-left{-size|style|color}
border-inline-start{-size|style|color}
border-right{-size|style|color}
border-inline-end{-size|style|color}
border-bottom{-size|style|color}
border-block-end{-size|style|color}
In her deep dive on logical properties and values, Rachel Andrew includes an excellent demo that demonstrates logical border properties and how they respond to different writing modes.
CodePen Embed Fallback
How can we start using all this today?
We can start using all the magic of logical properties and value today, thanks to the power of PostCSS! Jonathan Neal wrote this lovely PostCSS plugin that enables us to write logically and compile the code to something today’s browsers will understand. The plugin works in three stages:
It translates the new syntax to existing standards that unsupported browsers will recognize, using the :dir pseudo-class to create output to ltr and rtl.
It uses another one of Neal’s plugins to translate :dir to an attribute selector, like this:
It uses the postcss-nested plugin to transform nested selectors to one-line selectors, the same way other CSS preprocessors do.
PostCSS works with any workflow. You can try it with Grunt, Gulp, and webpack.
I will close by saying I have seen a lot of benefits since making the shift to logical properties and values. Sure, building multi-directional layouts takes time. There’s the learning curve, the addition of more properties to write, and of course, testing. Our previous methods for creating multi-directional layouts were either taking care of both directions in development or working on one direction at a time — neither of which is all that suitable for big projects. With logical properties and values you write your code once and it works for both directions without any consideration.
When a component lives in an environment where the data queries populating it live nearby, there is a pretty direct line between the visual component and the database where that exact content lives. That is opening up doors to site editing experiences that travel that line. We’re starting to see CMSs that directly leverage that.
For example, if I build my site where I’m writing GraphQL queries with a component to grab the data I need, it makes sense that I could change that data and put it back with a .
Take a look at TinaCMS, which is turning a lot of heads.
I just saw BodilessJS, which is up the same exact alley. They are trying to coin a new term here — where the content for a headless site comes from a headless CMS (via an API, as in, the content is elsewhere, rather than alongside the site itself) and a bodiless site has the content alongside the site in the same repo. Eh, I’m not huge on the word, but that kind of site probably does deserve some kind of classification.
Stackbit has a product in the works (“Stackbit Live”) that is another one down this alley. Here’s a screenshot from their interactive demo to give you an idea:
All of these seem to focus on React with a “probably other stuff later” vibe.
The (sponsored) video I did with Webflow last year had a CMS experience very much like this. It’s incredible what their CMS is able to do because of that direct line between the visual component and the data behind it.
The desire for this kind of site experience has been around forever. I remember services that were like, “Just put our special class on your elements and FTP credentials,” which would allow you to log into their site and edit the content on elements with a UI. It literally uploaded the changes back to static files on your server. I’m not sure any of those are around anymore as they went out of vogue for a while.
In a slightly more modern vein, Lea Verou’s Mavo is like this. The only place you can edit content is from the front end.
I think there will always sites where this type of editing experience is highly desirable.
Jeff Huang, while going through his collection of bookmarks, sadly finds a lot of old pages gone from the internet. Bit rot. It’s pretty bad. Most of what gets published on the web disappears. Thankfully, the Internet Archive gets a lot of it. Jeff has seven things that he thinks will help make a page last.
1) Return to vanilla HTML/CSS 2) Don’t minimize that HTML 3) Prefer one page over several 4) End all forms of hotlinking 5) Stick with the 13 web safe fonts +2 6) Obsessively compress your images 7) Eliminate the broken URL risk
I don’t take issue with any of that advice in general, but to me, they don’t all feel like things that have much to do with whether a site will last or not. Of them, #4 seems like the biggest deal, and #5 is… strange. (Fonts fall back on the web; what fonts you use should have no bearing on a site’s ability to last.)
I sort of agree with #1 and #2, but not on the surface. Both of them imply a build process. Build processes get old, they stop working, and they become a brick of technical debt. I still love them and can’t imagine day-to-day work without them, but they are things that stands in the way of people wanting to deal with an old site. Highly relevant, Simplicity, notes from Bastian Allgeier’s article.
Everything listed is technological. If we’re talking technological advice to keeping a site online for the long haul, I’d say jamstack is the obvious answer. Prerender everything into static files. Rely on no third-party stuff anything, except a host. (Disclosure: Netlify is a current sponsor of this site, but I’m tellin’ ya, toss a simple static site without a complex build process up on Netlify, which has a generous free tier, and that site will absolutely be there for the long haul. )
Don’t diddle with your URLs either. Gosh darn it if I don’t see a lot of 404s because someone up and changed up all their URLs.
But I feel there is something beyond the technological that is the real trick to a site that lasts: you need to have some stake in the game. You don’t let your URLs die because you don’t want them to. They matter to you. You’ll tend to them if you have to. They benefit you in some way, so you’re incentivized to keep them around. That’s what makes a page last.
In this article, we explain the difference between single-page apps (SPAs) and static sites, and how we can bring the advantages of both worlds together in a dynamic JAMstack app using GatsbyJS and FaunaDB. We will build an application that pulls in some data from FaunaDB during build time, prerenders the HTML for speedy delivery to the client, and then loads additional data at run time as the user interacts with the page. This combination of technologies gives us the best attributes of statically-generated sites and SPAs.
In short……auto-scaling distributed websites with low latency, snappy user interfaces, no reloads, and dynamic data for everyone!
Heavy backends, single-page apps, static sites
In the old days, when JavaScript was new, it was mainly only used to provide effects and improved interactions. Some animations here, a drop-down there, and that was it. The grunt work was performed on the backend by Perl, Java, or PHP.
This changed as time went on: client code became heavier, and JavaScript took over more and more of the frontend until we finally shipped mostly empty HTML and rendered the whole UI in the browser, leaving the backend to supply us with JSON data.
This led to a neat separation of concerns and allowed us to build whole applications with JavaScript, called Single Page Applications (SPAs). The most important advantage of SPAs was the absence of reloads. You could click on a link to change what’s displayed, without triggering a complete reload of the page. This in itself provided a superior user experience. However, SPAs increased the size of the client code significantly; a client now had to wait for the sum of several latencies:
Serving latency: retrieving the HTML and JavaScript from the server where the JavaScript was bigger than it used to be
Data loading latency: loading additional data requested by the client
Frontend framework rendering latency: once the data is received, a frontend framework like React, Vue, or Angular still has to do a lot of work to construct the final HTML
A royal metaphor
We can analogize the loading a SPA with the building and delivery of a toy castle. The client needs to retrieve the HTML and JavaScript, then retrieve the data, and then still has to assemble the page. The building blocks are delivered, but they still need to be put together after they’re delivered.
If only there were a way to build the castle beforehand…
Enter the JAMstack
JAMstack applications consist of JavaScript, APIs and Markup. With today’s static site generators like Next.js and GatsbyJS, the JavaScript and Markup parts can be bundled up into a static package and deployed via a Content Delivery Network (CDN) that delivers files to a browser. A CDN geographically distributes the bundles, and other assets, to multiple locations. When a user’s browser fetches the bundle and assets, it can receive them from the closest location on the network, which reduces the serving latency.
Continuing our toy castle analogy, JAMstack apps are different from SPAs in the sense that the page (or castle) is delivered pre-assembled. We have a lower latency since we receive the castle in one piece and no longer have to build it.
Making static JAMstack apps dynamic with hydration
In the JAMstack approach, we start with a dynamic application and prerender static HTML pages to be delivered via a speedy CDN. But what if a fully static site is not sufficient and we need to support some dynamic content as the user interacts with individual components, without reloading the entire page? That’s where client-side hydration comes in.
Hydration is the client-side process by which the server-side rendered HTML (DOM) is “watered” by our frontend framework with event handlers and/or dynamic components to make it more interactive. This can be tricky because it depends on reconciling the original DOM with a new virtual DOM (VDOM) that’s kept in memory as the user interacts with the page. If the DOM and VDOM trees do not match, bugs can arise that cause elements to be displayed out of order, or necessitate rebuilding the page.
Luckily, libraries like GatsbyJS and NextJS have been designed so as to minimize the possibility of such hydration-related bugs, handling everything for you out-of-the-box with only a few lines of code. The result is a dynamic JAMstack web application that is simultaneously both faster and more dynamic than the equivalent SPA.
One technical detail remains: where will the dynamic data come from?
Distributed frontend-friendly databases!
JAMstack apps typically rely on APIs (ergo the “A” in JAM), but if we need to load any kind of custom data, we need a database. And traditional databases are still a performance bottleneck for globally distributed sites that are otherwise delivered via CDN, because traditional databases are only located in one region. Instead of using a traditional database, we’d like our database to be on a distributed network, just like the CDN, that serves the data from a location as close as possible to wherever our clients are. This type of database is called a distributed database.
In this example, we’ll choose FaunaDB since it is also strongly consistent, which means that our data will be the same wherever my clients access it from and data won’t be lost. Other features that work particularly well with JAMstack applications are that (a) the database is accessed as an API (GraphQL or FQL) and does not require you to open a connection, and (b) the database has a security layer that makes it possible to access both public and private data in a secure way from the frontend. The implications of that are we can keep the low latencies of JAMstack without having to scale a backend, all with zero configuration.
Let’s compare the process of loading a hydrated static site with the building of the toy castle. We still have lower latencies thanks to the CDN, but also less data since most the site is statically generated and therefore requires less rendering. Only a small part of the castle (or, the dynamic part of the page) needs to be assembled after it has been delivered:
Example app with GatsbyJS & FaunaDB
Let’s build an example application that loads data from FaunaDB at build time and renders it to static HTML, then loads additional dynamic data inside the client browser at run time. For this example, we use GatsbyJS, a JAMstack framework based on React that prerenders static HTML. Since we use GatsbyJS, we can code our website completely in React, generate and deliver the static pages, and then load additional data dynamically at run time. We’ll use FaunaDB as our fully managed serverless database solution. We will build an application where we can list products and reviews.
Let’s look at an outline of what we have to do to get our example app up and running and then go through every step in detail.
Set up a new database
Add a GraphQL schema to the database
Seed the database with mock-up data
Create a new GatsbyJS project
Install NPM packages
Create the server key for the database
Update GatsbyJS config files with server key and new read-only key
Load the pre-rendered product data at build time
Load the reviews at run time
1. Set up a new database
Before you start, create an account on dashboard.fauna.com. Once you have an account, let’s set up a new database. It should hold products and their reviews, so we can load the products at build-time and the reviews in the browser.
2. Add a GraphQL schema to the database
Next, we use the server key to upload a GraphQL schema to our database. For this, we create a new file called schema.gql that has the following content:
type Product {
title: String!
description: String
reviews: [Review] @relation
}
type Review {
username: String!
text: String!
product: Product!
}
type Query {
allProducts: [Product]
}
You can upload your schema.gql file via the FaunaDB Console by clicking “GraphQL” on the left sidebar, and then click the “Import Schema” button.
Upon providing FaunaDB with a GraphQL schema, it automatically creates the required collections for the entities in our schema (products and reviews). Besides that, it also creates the indexes that are needed to interact with those collections in a meaningful and efficient manner. You should now be presented with a GraphQL playground where you can test out
3. Seed the database with mock-up data
To seed our database with products and reviews, we can use the Shell at dashboard.fauna.com:
To create some data, we’ll use the Fauna Query Language (FQL), after that we’ll continue with GraphQL to build are example application. Paste the following FQL query into the Shell to create three product documents:
Both types of documents will be loaded via GraphQL. However, there is a significant difference between products and reviews. The former will not change a lot and is relatively static, while the second is user-driven. GatsbyJS allows us to load data in two ways:
data that is loaded at build time which will be used to generate the static site.
data that is loaded live at request time as a client visits and interacts with your website.
In this example, we chose to let the products be loaded at build time, and the reviews to be loaded on-demand in the browser. Therefore, we get static HTML product pages served by a CDN that the user immediately sees. Then, as our user interacts with the product page, we load the data for the reviews.
4. Create a new GatsbyJS project
The following command creates a GatsbyJS project based on the starter template:
$ npx gatsby-cli new hello-world-gatsby-faunadb
$ cd hello-world-gatsby-faunadb
5. Install npm packages
In order to build our new project with Gatsby and Apollo, we need a few additional packages. We can install the packages with the following command:
$ npm i gatsby-source-graphql apollo-boost react-apollo
We will use gatsby-source-graphql as a way to link GraphQL APIs into the build process. Using this library, you can make a GraphQL call from which the results will be automagically provided as the properties for your react component. That way, you can use dynamic data to statically generate your application. The apollo-boost package is an easily configurable GraphQL library that will be used to fetch data on the client. Finally, the link between Apollo and React will be taken care of by the react-apollo library.
6. Create the server key for the database
We will create a Server key which will be used by Gatsby to prerender the page. Remember to copy the secret somewhere since we will use it later on. Protect server keys carefully, they can be used to create, destroy, or manage the database to which they are assigned. To create the key we can go to the fauna dashboard and create the key in the security tab.
7. Update GatsbyJS config files with server and new read-only keys
To add the GraphQL support to our build process, we need to add the following code into our graphql-config.js inside the plugins section where we will insert the FaunaDB server key which we generated a few moments ago.
For the GraphQL access to work in the browser, we have to create a key that only has permissions to read data from the collections. FaunaDB has an extensive security layer in which you can define that. The easiest way is to go to the FaunaDB Console at dashboard.fauna.com and create a new role for your database by clicking “Security” in the left sidebar, then “Manage Roles,” then “New Custom Role”:
Call the new custom role ‘ClientRead’ and make sure to add all collections and indexes (these are the collections that were created by importing the GraphQL schema). Then, select Read for each for them. Your screen should look like this:
You have probably noticed the Membership tab on this page. Although we are not using it in this tutorial, it is interesting enough to explain it since it’s an alternative way to get security tokens. In the Membership tab can specify that entities of a collection (let’s say we have a ‘Users’ collection) in FaunaDb are members of a particular role. That means that if you impersonate one of these entities in that collection, the role privileges apply. You impersonate a database entity (e.g. a User) by associating credentials with the entity and using the Login function, which will return a token. That way you can also implement password-based authentication in FaunaDb. We won’t use it in this tutorial, but if that interests you, check the FaunaDB authentication tutorial.
Let’s ignore Membership for now, once you have created the role, we can create a new key with the new role. As before, click “Security”, then “New Key,” but this time select “ClientRead” from the Role dropdown:
Now, let’s insert this read-only key in the gatsby-browser.js configuration file to be able to call the GraphQL API from the browser:
import React from "react"
import ApolloClient from "apollo-boost"
import { ApolloProvider } from "react-apollo"
const client = new ApolloClient({
uri: "https://graphql.fauna.com/graphql",
request: operation => {
operation.setContext({
headers: {
Authorization: "Bearer <CLIENT_KEY>",
},
})
},
})
export const wrapRootElement = ({ element }) => (
<ApolloProvider client={client}>{element}</ApolloProvider>
)
GatsbyJS will render its Router component as a root element. If we want to use the ApolloClient everywhere in the application on the client, we need to wrap this root element with the ApolloProvider component.
8. Load the pre-rendered product data at build time
Now that everything is set up, we can finally write the actual code to load our data. Let’s start with the products we will load at build time.
For this we need to modify src/pages/index.js file to look like this:
import React from "react"
import { graphql } from "gatsby"
Import Layout from "../components/Layout"
const IndexPage = ({ data }) => (
<Layout>
<ul>
{data.fauna.allProducts.data.map(product => (
<li>{product.title} - {product.description}</li>
))}
</ul>
</Layout>
)
export const query = graphql`
{
fauna {
allProducts {
data { _id title description }
}
}
}
`
export default IndexPage
The exported query will automatically get picked up by GatsbyJS and executed before rendering the IndexPage component. The result of that query will be passed as data prop into the IndexPage component.If we now run the develop script, we can see the pre-rendered documents on the development server on http://localhost:8000/.
$ npm run develop
9. Load the reviews at run time
To load the reviews of a product on the client, we have to make some changes to the src/pages/index.js:
import { gql } from "apollo-boost"
import { useQuery } from "@apollo/react-hooks"
import { graphql } from "gatsby"
import React, { useState } from "react"
import Layout from "../components/layout"
// Query for fetching at build-time
export const query = graphql
`
{
fauna {
allProducts {
data {
_id title description
}
}
}
}
`
// Query for fetching on the client
const GET_REVIEWS = gql
`
query GetReviews($productId: ID!) {
findProductByID(id: $productId) {
reviews {
data {
_id username text
}
}
}
}
`
const IndexPage = props => {
const [productId, setProductId] = useState(null)
const { loading, data } = useQuery(GET_REVIEWS, {
variables: {
productId
},
skip: !productId,
})
}
export default IndexPage
Let’s go through this step by step.
First, we need to import parts of the apollo-boost and apollo-react packages so we can use the GraphQL client we previously set up in the gatsby-browser.js file.
Then, we need to implement our GET_REVIEWS query. It tries to find a product by its ID and then loads the associated reviews of that product. The query takes one variable, which is the productId.
In the component function, we use two hooks: useState and useQuery
The useState hook keeps track of the productId for which we want to load reviews. If a user clicks a button, the state will be set to the productId corresponding to that button.
The useQuery hook then applies this productId to load reviews for that product from FaunaDB. The skip parameter of the hook prevents the execution of the query when the page is rendered for the first time because productId will be null.
If we now run the development server again and click on the buttons, our application should execute the query with different productIds as expected.
$ npm run develop
Conclusion
A combination of server-side data fetching and client-side hydration make JAMstack applications pretty powerful. These methods enable flexible interaction with our data so we can adhere to different business needs.
It’s usually a good idea to load as much data at build time as possible to improve page performance. But if the data isn’t needed by all clients, or too big to be sent to the client all at once, we can split things up and switch to on-demand loading on the client. This is the case for user-specific data, pagination, or any data that changes rather frequently and might be outdated by the time it reaches the user.
In this article, we implemented an approach that loads part of the data at build time, and then loads the rest of the data in the frontend as the user interacts with the page.
Of course, we have not implemented a login or forms yet to create new reviews. How would we tackle that? That is material for another tutorial where we can use FaunaDB’s attribute-based access control to specify what a client key can read and writefrom the frontend.
The code of this tutorial can be found in this repo.
If you’re on a small screen, remind yourself to check it out on a big screen when you have the chance.
Did you know that styles from an active transition beat !important rules, but styles from an active animation do not? I definitely did not.
Or that there are “origins” that are almost like a secret layer of specificity, and are reversed when !important rules are in play? What?!
Oh and speaking of origins, there is discussion (that’s a tweet from Jen about an idea that came from Miriam) about opening them up to having user-authored origin levels. As in, loading Bootstrap at a lower origin level on purpose, and your own styles at a higher origin, so that anything you write wins. I keep going back and forth on it. I love having powerful tools, and this kind of overriding power seems clearly useful, but I don’t like the idea that I can’t look at a selector and know if it’s going to win or not, I need to know information about the origin too, which will be tricky to find out as it’s likely in another file who-knows-where as CSS can be loaded a number of different ways.
WordPress Multisite is a popular feature of WordPress, which enables you to create and run multiple websites using the same WordPress installation on your server. In other words, you can manage several different WordPress websites from a single dashboard.
However, people are sometimes unsure of how to use this feature. This guide will help to clear up questions related to what WordPress Multisite is, who needs it, and how to install it.
Let’s start with the basics.
1. What Is WordPress Multisite?
WordPress Multisite is a feature that allows you to create and run multiple WordPress websites from a single WordPress dashboard. It was previously called WordPress Multi-User or WPMU. WordPress Multisite is not a new feature. It is an advanced feature on the WordPress platform that has been around since the launch of WordPress 3.0. You can use it for a variety of purposes, such as updating all of your websites with a single click or charging your subscribers to create a website on your Multisite network.
2. Key Features Of WordPress Multisite
WordPress Multisite comes with various unique features. For starters, you can run a network of blogs and websites from a single WordPress installation. It enables you to create a network of subdomains, like http://john.example.com, or directories, like http://www.example.com/john/. Alternatively, you can also have a separate domain for each website on the network. It is also easier to replicate functionality across a network of websites.
In WordPress Multisite, you can control the entire network as a Super Admin. As a regular website admin, you can control only one website on the network. As a Super Admin, you control the accessibility of users who want to create an account and set up WordPress blogs or websites of their own.
A Super Admin can install new themes and plugins, make them available to the websites on the network, and also customize the themes for all websites. Another feature is the ability to create websites and online shops intended for specific languages, regions, and currencies.
Both the Super Admin and the website admin can control content. While this control extends over the entire network for a Super Admin, the website admin has the right to choose which content from the main domain gets displayed on their respective website. Plugins are also under the control of a Super Admin. However, a website admin can activate and deactivate plugins on their website if required.
3. Who Should And Shouldn’t Use WordPress Multisite?
Although WordPress Multisite offers several features, it is not always the right choice. The main concern is that the websites on a Multisite network would share the same database. In other words, you can’t back up only a single website. That’s why all of the websites on a network must belong to the same principal domain.
Let me explain with an example. A university could use WordPress Multisite to build different websites for each department, for student and faculty member blogs, and for forums. Because the websites would share their database with the university’s main domain, they would be easier to manage on a Multisite network.
Likewise, banks and financial institutions with a national or global network of branches, digital publications with multiple content sections, government offices with multiple departments, hotel chains, stores with multiple outlets, e-commerce companies, and website design companies such as Wix could also use a Multisite network to their advantage.
However, a web designer couldn’t use Multisite to manage several unrelated client projects. If one of the clients decided to move their website elsewhere, it would be a problem because the website would be sharing its database with others on the network. Multisite makes it difficult to back up an individual website on the network. You would be better off using a single installation in this case.
4. Pros And Cons Of WordPress Multisite
Now that we know who should and shouldn’t use WordPress Multisite, let’s look at the technical pros and cons. You’ll need to weigh them carefully before making a decision.
Pros
The main advantage is the ability to manage multiple websites from a single dashboard. This is useful if you are running multiple websites managed by different teams under one parent domain, such as an e-commerce store with different country-specific sub-sites.
However, you can also assign a different admin to each website on your network.
With a single download, you can install and activate plugins and themes for all of the websites on your network.
You can also manage updates with a single master installation for all of the websites on your network.
Cons
Because all of the websites share the same network resources, they will all go down if the network goes down.
A sudden increase in traffic to one website will affect all others on the network. Unfortunately, beginners often find it difficult to manage traffic and server resources on a Multisite network.
Similarly, if one website gets hacked, the entire network will get compromised.
Not all WordPress plugins support a Multisite network.
Likewise, not all web hosting providers have the tools necessary to support a Multisite network.
If your hosting provider lacks the server requirements, you won’t be able to use the Multisite feature. For example, some hosting providers might not allow you to add a domain to the same hosting server. In that case, you might need to change or upgrade your hosting plan or change providers.
5. Requirements For WordPress Multisite
Knowing the technical pros and cons, you must have decided whether Multisite is the right option for you. If you are going to use it, you will need to meet a few technical requirements first.
One of the first things you will need is a web hosting service provider that can handle multiple domains in a single web hosting plan. Although you could use shared hosting for a couple of websites with low traffic, you should use VPS hosting or a dedicated server, owing to the nature of the WordPress Multisite network.
You will also need to have the fundamental knowledge of how to install WordPress. It would be an added advantage if you already have a WordPress installation. However, you will need to back it up. You will also need to deactivate all of the plugins.
Make sure you have FTP access. You will need to know the basics of editing files using FTP as well. Finally, you will need to activate pretty permalinks. In other words, your URLs should look not like http://example.com/?p=2345, but like http://example.com/my-page.
6. Multisite Domain Mapping
By default, you can create additional websites on your Multisite network as subdomains or subfolders of the main website. They look like this:
subsite.network.com
or like this:
network.com/subsite
However, you might not always want this, because you will be required to create a unique domain name for each website. That’s where domain mapping comes to the rescue. You can use this feature within the Multisite network to map additional websites to show as domain.com. Using domain mapping, this is what you will see:
subsite.network.com = domain.com
or:
network.com/subsite = domain.com
Prior to WordPress 4.5, you had to use a domain mapping plugin to map the additional websites. However, in version 4.5+, domain mapping is a native feature.
7. Multisite Hosting And SSL
As you probably know, Secure Sockets Layer (SSL) enables you to transport data over the internet securely. The data remains undecipherable to malicious users, bots, and hackers.
However, some hosting providers offer free SSL certification for the main domain only. You might need to buy it separately for each subdomain. If one of the websites on your multisite network lacks SSL certification, it will compromise the security of all the other websites. Thus, ensure that all websites on your WordPress Multisite network have SSL certificates.
8. Installing And Setting Up WordPress Multisite For New And Existing Websites
First, you will need to install WordPress. Once it’s installed, you will need to enable the Multisite feature. You can also enable it on your existing WordPress website. Before doing so, however, back up your website.
Use an FTP client or the cPanel file manager to connect with your website, and open the wp-config.php file for editing.
Add the following code to your wp-config.php file just before the /*:
Now, save and upload your wp-config.php file back to the server.
That’s all!
Next, you will need to set up the Multisite network. If you are already logged into your WordPress dashboard, refresh the page to continue with the next steps. If not, you will need to log in again.
When setting up the Multisite network on your existing website, you will need to deactivate all plugins. Go to the “Plugins” » “Installed Plugins” page, and select all plugins. Select the “Deactivate” option from the “Bulk Actions” dropdown menu, and click “Apply”.
Now, go to “Tools” » “Network Setup”. If you see a notice that you need Apache’s mod_rewrite module installed on your server, don’t be alarmed. All leading WordPress hosting providers keep this module enabled.
Choose the domain structure for websites on your network, either subdomains or subdirectories.
Add a title for your network.
Make sure that the email address for the network admin is correct.
Click the “Install” button.
You will see some code that you have to add to the wp-config.php and .htaccess files, respectively. Use an FTP client or the file manager in cPanel to copy and paste the code.
The set-up is complete. You will need to log in again to access your Multisite network.
9. WordPress Multisite Configuration And Other Settings
Hold on! You still need to configure the network settings, for which you will need to switch to the Multisite network dashboard.
Open the “My Sites” menu in the admin toolbar. Click the “Network Admin” option, and then click the “Dashboard” option to go to the Multisite network dashboard.
Click the “Settings” option in the admin sidebar. You will see your website’s title and the admin’s email address. Make sure they are correct before moving on to a few essential configuration settings.
A. Registration Settings
This setting enables you to open your website to user registration and allows existing users to create new websites on your network. Check the appropriate box.
If you check the “Registration Notification” box, you will receive an email notification whenever a new user or website gets registered. Check the “Add New Users” option to enable individual website administrators to add new users to their own websites.
Use the “Limited Email Registration” option to restrict registration to a specific domain. For example, allow only users from your company to register with your website. Likewise, you can also prevent some domains from being registered.
B. New Website’s Settings
Here, you can configure the default options, such as welcome emails and the contents of the first default post, page, and comment, for every new website built on your Multisite network. You can update these settings anytime.
C. Upload Settings
You can limit the total amount of space each website on your network can use for uploads. This will help you to delegate server resources judiciously. The default value is 100 MB. You can also set the type of files that users can add to their websites, such as images, .doc, .docx, and .odt files, audio and video files, and PDFs. You can also set a size limit for individual files.
D. Menu Settings
This setting enables the administrative menu for the plugins section of your network’s websites. Once you enable this setting, users will be able to activate and deactivate plugins, but won’t be able to add new ones. Click “Save Changes” to apply the changes you have made.
10. Resources: Setting Up Themes And Plugins
Because individual website administrators can’t install themes and plugins on their own, you will need them to set up on the network.
A. Themes
Go to “My Sites” » “Network Admin” » “Themes”.
On this page, you will see a list of the themes currently installed. Use the following settings to make your desired changes.
“Network Enable”: Make the theme available to website administrators.
“Network Disable”: Disable a theme that you have previously made available.
“Add New”: Install a new theme on your network.
Change a Default Theme
Add the following code to your wp-config.php file to change the default theme for new websites (replacing your-theme with the name of the theme’s folder):
// Setting default theme for new sites
define( 'WP_DEFAULT_THEME', 'your-theme' );
B. Plugins
Go to “My Sites” » “Network Admin” » “Plugins”.
Click the “Network Activate” option below each plugin to add it to your network. Remember that if you have already enabled the “Plugins Menu” option for website administrators in the “Network Settings”, then admins will not be able to delete or install new plugins. However, they will be able to activate and deactivate existing plugins.
11. How To Add A New Website To The Multisite Dashboard
Go to “My Sites” » “Network Admin” » “Sites”.
Click the “Add New” button.
Fill in the following fields.
Add the address (URL) for your new website.
Enter your “Site Title”.
Enter the email address of the new website’s administrator.
Click the “Add Site” button to finish the process.
12. Google Analytics On WordPress Multisite
You can also generate Google Analytics code for all pages on all of the websites on your Multisite network. If you haven’t already done so, create a Google Analytics account, and sign into it.
Start by creating a property to set up a Google Analytics ID. You will need this ID to install your global site tag (gtag.js).
Next, find your Google Analytics ID in the “Property” column of the relevant account in the “Admin” section of your Analytics account.
Now, you can copy and paste the global site tag on the relevant web pages. Add the gtag.js tag right after the opening tag. You can have different analytics code for each website on the network, and the Super Admin can manage all of them if needed.
13. Setting Up On Local Host
You can use any WAMP or LAMP software to set up WordPress Multisite on a local system. You’ll need to follow the same steps you did to host a website. However, take care with the domain mapping. You can easily set up a subdirectory website in the local system, but to set up a subdomain or a different domain, you’ll need to set up virtual host on the WAMP or LAMP server.
14. Useful Plugins For WordPress Multisite And How They Work
You can use a variety of plugins to ensure the smooth operation of your Multisite network.
A. Domain Mapping
This plugin enables you to offer each website on your network its own domain name.
B. WPForms
Create different forms using a simple drag-and-drop tool.
C. Yoast SEO
Optimize the websites on your network for better search engine results. Yoast is a well-known name in the SEO world.
D. Pro Sites
Offer paid upgrades, advertising, and more, thereby monetizing your Multisite network. You can restrict the features of the free website, encouraging users to upgrade.
E. SeedProd
Add customized “Coming soon” and “maintenance mode” landing pages. This will jazz up the network while administrators work on their websites.
F. WP Mail SMTP
Fix the “WordPress is not sending email” issue with this plugin. It allows you to use an SMTP server to send crucial Multisite registration and notification emails.
G. User Switching
Using this plugin, you can switch user accounts as network admin to see what your users are experiencing when working on their websites. It can help you to troubleshoot some functionality issues.
15. Troubleshooting And FAQs
A. Troubleshooting
When setting up a Multisite network, you might encounter a few common problems. Let’s see how to troubleshoot these issues.
I. Login Issues
You might encounter a wp-admin login issue If you are using WordPress Multisite with subdirectories, rather than subdomains. If you are not able to log into the WordPress back end for individual websites with subdirectories, you can try replacing the define ('SUBDOMAIN_INSTALL', true); line in wp-config.php file with define ('SUBDOMAIN_INSTALL', 'false');.
II. Find Unconfirmed Users
Sometimes, you might not be able to find registered users who haven’t received an activation email. Usually, poorly configured mail settings are responsible for this problem. You can use SMTP (Simple Mail Transfer Protocol) to send activation emails. The PHP Mail function might send emails to the junk folder due to unauthorized email sending. Instead, you can use SMTP with proper domain authentication to get emails delivered to the inbox. Use any SMTP service provider, such as MailGun or Gmail.
B. FAQs
1. Can I install plugin “X” in my WordPress Multisite?
Yes, you can install any plugin in Multisite. However, not all plugins support Multisite. Check the plugin’s support before installing it.
2. Can I share user logins and roles across a Multisite network?
Yes, you can share user logins and roles across multiple websites. This comes in handy if you want website admins to manage the content on their own websites in your Multisite network.
3. Is it possible to display the main website’s posts on all websites on the network?
Yes, you can show your main website’s posts across the network.
4. If I am a Super Admin, can I log into all network websites with a single ID?
Yes, Super Admins can use the same credentials to sign into all network websites.
5. As a Super Admin, can I log into another network’s websites?
No, you can’t sign into networks other than your own.
6. Can I add more websites to my network later?
Yes, you can add as many websites as you want, anytime you want.
7. Can I use different plugins for each website, such as Yoast for one and All in One SEO for another?
Yes, you can use different plugins with similar functionality for different websites. However, you must set the plugin for the specific website you want. If you activate it for the entire Multisite network, it will work on all websites automatically.
8. Can I install a plugin on an individual website?
No, you cannot install a plugin directly on an individual website. You have to install it on the network. However, you can activate or deactivate it for a specific website.
9. Can I create a theme and apply it to a specific website?
Yes, you can create as many themes as you like. You can also activate or deactivate themes as a website’s admin.
16. WordPress Multisite Examples
Here are a few well-known brands using a WordPress Multisite network.
OpenView Venture Partners OpenView Venture Partners is a venture capital firm. The company uses a Multisite installation to run three different websites, including the corporate website, the corporate blog, and a multi-author blog called Labs. The company runs the last two websites under the subdomains blog.openviewpartners.com and labs.openviewpartners.com. Each website has a centralized theme that works perfectly.
The University of British Columbia Blogs The University of British Columbia (UBC) also uses WordPress Multisite. The purpose here is to enable professors to create course websites, build blogs with multiple contributors, and create portfolios for students as well as staff members. The WordPress Multisite installation gives teachers complete control over their online communities. They can add as many students as they like and take teaching beyond the walls of the classroom.
Cheap Flights Cheapflights is a travel website, offering flight tickets, hotel bookings, and vacation packages. The website uses WordPress Multisite to power its Travel Tips section. The section covers the latest travel news, tips on flying, information on the best places to travel to, and more.
Wrapping Up
As you can see, WordPress Multisite comes with several advantages. You can control and manage several websites from a single dashboard. It can certainly reduce your legwork and make your website monitoring hassle-free. Hopefully, you now have enough knowledge on installing, troubleshooting, and working with applications on a Multisite network to take the plunge.
Have you ever used WordPress Multisite? Will you consider using it for future projects? Let us know in the comments section below.
So you want to find out more about surveys, what they entail, how they compare to similar data-collection methods, and how to get started creating one? Then this is the perfect guide for you.
What is a survey?
Here’s the simplest and briefest definition: A survey is a structured way to collect information or feedback. Surveys can be used to gain insights on just about anything, from all kinds of audiences. You can get a more in-depth answer to the What is a survey? question here, along with a few other FAQs.
For the most part, surveys are fairly simple to create and carry out, but there are a few things you need to be aware of to get high-quality results. We’ll cover all that and more in the following chapters.
Chapter synopsis
Chapter 1: Introduction. Brief definitions and chapter synopsis.
Chapter 2: How to create a great survey. Before you start your surveying process, take a look at the three tips in this chapter. You’ll also get an idea of what it’s like to create surveys using different tools.
Chapter 3: Survey types. Curious about the different types of surveys? We cover a bunch, both by purpose and by distribution method.
Chapter 4: Surveys vs other data-collection methods. Confused about the difference between a questionnaire and a survey or a census and a survey? We break down the distinctions between these and other well-known data-collection methods so you have a clear idea of what surveying entails.
Chapter 5: Survey methodology. In this chapter we cover survey methodology and how to draw meaningful conclusions from your collected data. This section also outlines the pros and cons of survey research so you’re aware of some of the challenges.
Chapter 6: Survey templates from JotForm. This chapter explores several survey templates you can use to start your survey journey.
Remember to bookmark this guide for later reference. When you get stuck on methodology or question generation, you’ll want a handy link to the insights presented below.
How to create a great survey: Tips and tools
Creating a well-rounded survey takes more than just picking a random tool, typing a few questions, and hitting send. It takes critical thinking, planning, and patience. While we can’t necessarily help you with the patience part, we can help you think critically and plan your survey with the tips and instructions below.
Review these tips before creating your survey
Set a clear goal for your survey
Define your target audience
Think critically about your questions
Ask only one thing. There should be a one-to-one relationship between what’s being asked and how survey participants can respond.
Be objective and unambiguous. Try to make your questions as objective as possible, even if you want a subjective response, such as how a person feels about something. Use unambiguous language to ensure your meaning is clear. For example, use the words daily or weekly instead of frequently, as frequently can be interpreted differently by each participant.
Be only as long as needed to elicit an accurate response. Don’t give a lot of details if a simple description will do. Try to be brief unless the participant needs more information to answer the question accurately.
Align with your goal. If a question won’t produce an answer that helps you achieve your goal, leave it out. More information is not always better.
There are many more tips where these came from. In fact, we had to write two separate guides to discuss them all:
How to create a survey using the best survey tools
Google Forms. Part of the popular Google set of office tools, Google Forms pairs organically with its sister products. Form creation is easy, as is keeping track of survey responses. However, Google Forms has a traditional survey design that doesn’t allow for much customization. Check out our guide on how to create a Google Survey.
Word. While not the most modern survey tool, Word still has its uses. Most people already have this word processing program installed on their computer, making it readily accessible. If you want a simple tool to create a quick survey for printing and distributing in person, this could work. Check out our blog for step-by-step instructions about how to create a survey in Word.
JotForm. JotForm is just as easy to use as all the above tools, without any of the drawbacks. You can customize every element of your surveys to your heart’s content, including the visuals, question display style, and branding. JotForm also integrates with all the applications you use every day. Get a head start by using one of JotForm’s numerous survey templates, or begin with a blank canvas and paint your own survey picture by following these steps.
Now that you have a good idea about survey creation, let’s take a look at the various types of surveys.
Types of Survey
Surveys come in all shapes and sizes and can be delivered in a multitude of ways. To give you a broad sense of the different approaches you can take with yours, we cover the major survey types below — categorized by purpose and distribution method.
Survey types by purpose
Customer satisfaction
When your target audience is customers, there are a number of options you can use. If you have a service-based company, you may want to gauge your customers’ satisfaction with your service offerings. You could also determine their satisfaction with the employees they interact with or their overall satisfaction with your company.
Alternatively, if you have a product-based company, you could ask for feedback from a select group of customers about different products they’ve bought?—?what they like, what they don’t like, and what aspects of the product could be improved. Such feedback could lead you to either modify the product or create an entirely new one.
Tangentially, you could ask a wider selection of customers whether they would be interested in a new product that encompassed the feedback you received from other customers.
Employee engagement
Much as with customers, employees also offer many opinions on internal matters?—?whether it concerns their work environment, peers, or company happenings.
Employee engagement is an important aspect many companies focus on. Engagement in this context can mean different things, but it generally refers to employees’ happiness, connectedness, and feeling of being valued in the workplace.
This is an important factor since organizations with high engagement have lower absenteeism and turnover, fewer safety incidents, and fewer quality incidents when compared to organizations with low engagement. Thus, regularly assessing employee engagement through surveys can help you keep a pulse on engagement levels and address potential issues before they become big problems.
It doesn’t stop at engagement, though. You can survey employees to help make company decisions, such as moving locations or adding new perks to your employee benefits package.
Sometimes you need opinions from people your company hasn’t interacted with before. Because your customers and employees have engaged with your business, they may not be able to provide the unbiased feedback you’re looking for. Alternatively, you could be looking to feel out the market for a new line of business. Or you may want to get input from a general sampling of people for any number of other reasons.
Market research allows you to do just that?—?whether you want to launch a new product, gauge brand awareness, or see how you stack up against competitors. With a market research survey, you choose who you want to target based on criteria like demographics, lifestyle, product usage, and geography. Surveying the segmented group you identify will provide you with data to help inform your business decisions, so you don’t have to rely on assumptions and guesswork.
Survey distribution methods
Face to face
Ranking by far the highest in participant cooperation, surveys conducted via face-to-face interviews generally produce very detailed responses. That’s because the interviewer can ask follow-up questions and dig deep into the reasoning behind responses, unearthing greater insights for decision-making. However, this method can be costly, time-consuming, and difficult to arrange due to geographic restrictions or limited availability.
Online
Unlike face-to-face or telephone surveys, online surveys provide the greatest opportunity to reach the most people without being limited by location or time zone. Online survey participants can generally complete surveys from anywhere as long as they have an internet connection and an appropriate device, and can complete the survey within your set time limit. Additionally, it’s generally cheaper and faster than the other options, and there are many survey tools available that make distribution and response collection simple.
Telephone
Surveys conducted via phone offer a compromise between face-to-face interviews and surveys distributed online. While these surveys face similar issues to face-to-face ones (lengthy to conduct, language barriers, limited availability, etc.), they are less costly and aren’t restricted by geography.
Phone-based surveys also allow for an active and personable conversation between the interviewer and participant. George Kuhn, president of Drive Research, adds that “much like face-to-face surveys, phone surveys allow interviewers to ask additional questions and give respondents the opportunity to explain their answers in greater detail. This results in higher-quality responses, especially from respondents who would otherwise answer differently due to the lack of anonymity of a face-to-face interview.”
So you’re clued in on the wide array of survey types, but what differentiates surveys from other data-collection methods? We answer this question in the next chapter.
What differentiates survey from other data collection methods?
When designed correctly and distributed to a carefully researched demographic, surveys can provide a wide variety of data points that are ripe for insightful analysis and corresponding action.
For example, ProjectManager.com conducted a paid time-off (PTO) survey of full-time employees across several industries. Responses provided information about how certain age groups felt about PTO and how well their feelings about their company’s PTO plan aligned with the company’s intentions.
“The insights from the 400+ responses were enlightening. Plus, the corresponding white paper we created was well received and shared across social media, driving attention to our software products,” says Kris Hughes, the company’s senior content marketing manager.
But are there other ways to collect data? And how do they compare to surveys? Keep reading to find out.
How surveys compare to other data-collection methods
Survey vs questionnaire
The best way to think about the distinction between a survey and a questionnaire is to consider a questionnaire as one part of a survey. A questionnaire is simply a set of questions, while a survey is the entire lifecycle of research — questions, the delivery or distribution of those questions, and the analysis of responses to those questions.
Other than using a questionnaire for pure input purposes, such as asking people for their email address, it will always be part of a survey.
Survey vs poll
The biggest difference between a survey and a poll is length. Unlike surveys, polls are extremely short — typically only one multiple-choice question. When you use a poll, you’re trying to quickly and simply gather information about one specific thing. “Surveys provide more actionable data points than polls since polls have no wiggle room,” says Hughes.
Robyn Bolton, founder of MileZero, says polls are useful for clarifying details. For example, if you’ve created a new product, you may want to determine which features to include as standard versus optional. Or you may be trying to choose a color. “For simple questions like these,” Bolton says, “a poll can be useful to understand an absolute preference, while surveys can be useful to understand relative preferences.”
Survey vs census
The main difference between a census and a survey is the sample size. While a survey queries a segment of a given population, a census attempts to capture information for the entire population. In other words, a survey is meant to only represent the population, but a census is the population.
Understandably, a census is a much larger and longer undertaking than even the most complex or sizeable surveys, though its results are more reliable and accurate than a survey. It’s no wonder the U.S. Census is only conducted every 10 years.
Survey vs focus group
A focus group is a qualitative research method that involves questioning a small group of participants simultaneously, usually together in the same room or via video conference. A moderator presides over the group.
“The moderator’s job is to guide the discussion and gauge participants’ honest thoughts and reactions to the subject at hand, such as your product, service, or brand,” explains Larissa Murillo, marketing manager at MarketGoo.
Surveys differ from focus groups in that surveys take a more quantitative approach. They mostly deal with numbers or easy-to-quantify responses that can be analyzed on a spreadsheet. “While the numbers may give you clues, they don’t tell the whole story,” says Jim Jacobs, president of Focus Insite.
Jacobs notes that the error rate on a quantitative survey tends to be much higher than a qualitative method like a focus group or even an in-depth interview. “An experienced moderator or interviewer can quickly get to the root of a response and dig up additional details — something that won’t be revealed by simply checking a box on a standard survey,” he adds.
Is a survey the right tool for your purposes? With comparisons out of the way, let’s take a deeper look into surveys, including the methodology behind them and the pros and cons.
Survey methodology: A deeper look
Recall that a survey queries a sample of a given population, such as a subset of your customer base or employees within a certain department. Identifying and selecting that population sample is part of your survey methodology. Other aspects of survey methodology include evaluating and testing questions, determining the method for posing questions and collecting responses, and adjusting survey estimates to correct for errors.
But how do you know if your processes and methods will produce the insights you’re seeking? Consider the advice below to help ensure you’ve done the due diligence needed to set you up for success.
Survey methodology: How to draw meaningful conclusions
First, ensure you’re following best practices for survey data collection. In that section, we cover several tips to prepare you for collecting survey data and maximize your chances of getting high-quality results.
Second, get your population sample right. “Your population sample must represent your target audience, and it should be large enough to have statistical significance,” says Claire Shaner, content marketing specialist at BestCompany.
Here’s the example she gives: If you want to survey your employees on their feelings about the human resources function, but you only get 10 responses from interns, that’s not sufficient to generalize the feelings of your entire workforce. If you’re curious about what sample size is appropriate, check out this handy sample size table.
Last, when you get the results, be methodical as you review the data. Pay close attention to the questions you identified as being most important to achieving the goal of your survey. Cross-tabulate, filter, and graph responses to those questions among any subgroups and analyze your findings.
Assuming your sample size is large enough and representative of your target audience, you should observe fairly accurate trends as you manipulate the raw data. Formulate your own conclusions and test them by systematically bringing in and comparing the responses to your other questions.
Pros and cons of survey research
Surveying is generally considered a reliable and useful approach to information gathering, but there are some challenges to overcome as well.
Pros
You can collect a broad range of data. You can use surveys to gauge attitudes, beliefs, values, opinions, motivations, and a host of other feedback. With these different data points, you can draw a more holistic picture of your survey topic.
Results tend to be statistically significant. Recall that statistical significance is essential to drawing meaningful conclusions. Since surveys are often cheap and easy to administer, you can reach more people and improve the population representativeness of your results.
Anonymity can elicit more honest answers. Respondents to surveys delivered online remain anonymous, which can encourage people to be more transparent in their answers. “Using a third-party firm that collects and aggregates responses before passing them on to you provides further anonymity and separation between you and participants,” notes David Chaudron, managing partner at Organized Change.
Cons
Survey creators may be unsure about how to measure certain sentiments. Chaudron provides an interesting example about museum staff members who were unsure how to gauge the popularity of a children’s exhibit. Giving kids smiley face surveys didn’t provide enough information, so they observed how many kids pressed their noses against the glass of the exhibit instead.
It can be hard to find a balance in data collection. Stacy Caprio, founder of Accelerated Growth Marketing, gives her take on walking the tightrope of data collection: “Collect too little data, and it’s statistically insignificant. Collect too much data, and it could take too much time to complete collection and assess the results before you’re forced to make a decision.”
The target audience may not know what they want. In the case of asking customers about new products, they may not know that what you’re creating is something they would want or need in the future. “Customers don’t always know what may best serve their needs, so you may hamper your innovation by relying too much on their feedback,” explains Caprio.
Now that you’ve learned more about surveys, it’s time to put that knowledge into action by creating your own survey. Start with one of the survey templates below.
Examples of JotForm’s surveys
Once you’ve identified your survey goal, read up on best practices for survey data collection, and determined how to draw meaningful conclusions from your surveys, what’s next? Creating your survey, of course.
To create your survey, you’ll need to develop the right questions, identify the most appropriate responses, and choose the right tool to distribute and collect the surveys. But why start from scratch when you can follow in the footsteps of the countless researchers, marketers, and consultants who came before you?
These survey creators have already done most of the hard work for you by building survey templates on JotForm. They come in two formats:
Classic, where questions are shown all at once
Card, where questions are displayed one at a time
Your survey template options
Whether you’re looking to conduct market research, gauge patient satisfaction, or anything else, JotForm has a vast library of survey templates ready to suit your needs. Check out some of our most popular survey templates to see if one fits the bill.
Event satisfaction survey
This is our most popular survey template. It’s been cloned over 17,000 times and includes a few quick questions about an attendee’s experience at an event. You can send this to attendees after the festivities are over to get their take, and then use their feedback to improve your next event.
Questions in the template cover previous attendance and attendees’ satisfaction levels with different aspects of the event, like location and content. Also included is space for attendees to detail ways they feel the event could be improved.
Check out this survey template in its classic and card formats.
Restaurant evaluation survey
This multi-question survey is for gauging your customers’ feelings about the food and service provided at your restaurant. You can use it to ensure there are no issues with food preparation and quality or staff performance.
As expected of a restaurant survey, questions deal with order accuracy, cleanliness, speed of service, and overall experience. There’s also an open-ended question for general comments and suggestions.
Check out this survey template in its classic and card formats.
Market research survey
If you’re looking to get opinions from a specific group of people for market research, such as for a new product line, you’ll need to filter out those who don’t fit your criteria. This form gives you a great start with demographic questions like gender, age, household income, and more that you can easily modify. Then just add your specific questions and distribute accordingly.
Check out this survey template in its classic and card formats.
Patient satisfaction survey
Similar to the event satisfaction survey, the patient satisfaction survey is brief and gauges how patients felt about their doctor’s visit. You can use this for any healthcare setting, whether it be a hospital, clinic, or other facility.
Survey questions ask for a patient’s gender and birthdate, as well as their sentiments about the doctor, nurse, and general visit experience. The survey ends with a free space for patients to share their thoughts on how the facility could improve its service.
Check out this survey template in its classic and card formats.
Product survey
The product survey is more in-depth than the previous ones. A big distinction is that it asks for respondents to identify themselves and provide contact information. If you’re looking for deep insights into how and why customers use your products, this is the right survey template. You can use the contact info to follow up with customers via phone.
The survey queries respondents about how long they’ve used the product, how it compares to competing products, and more.
Check out this survey template in its classic and card formats.
Training evaluation survey
Are you looking for feedback on the training you’re delivering to customers or employees? This form offers the perfect starting point for creating an insightful survey. If you want to keep things simple, use the template’s basic questions concerning participants’ overall satisfaction, sentiments about various training aspects, and whether they’d recommend the training to others.
Check out this survey template in its classic and card formats.
Any one of the above survey templates (or hundreds of others) should give you a great head start in building a survey that will help you get the information you need. Good luck!
In the past few years, we’ve seen a lot of change and diversion in regard to web technologies. In 2020, I foresee us as a web community heading toward two major trends/goals: extensibility and interoperability. Let’s break those down.
Extensibility
Extensibility describes how much someone can take a particular technology and extend it to their own needs. We’ve built a component-based web over the last few years in terms of both development (React components! Vue components! Svelte components! Web components!) and design (Design systems!). Interesting how form follows function, isn’t it?
Now we’re trying to make that component system look and feel more unique. Extensibility on the web allows us to tailor the platform to our own needs, and experiment with outcomes.
CSS itself is becoming much more extensible…
CSS Houdini
With CSS Houdini, developers will be able to extend what’s currently possible in the CSS Object Model and teach the browser how they want it to read and render their CSS.
That means that things that weren’t previously possible on the web, like angled corners or round layout, now become possible.
CodePen Embed Fallback
If you’re not yet familiar with Houdini, it’s an umbrella term that describes a few different browser APIs, intended to improve browser performance. It makes styling more extensible and lets users dictate their own CSS features. Houdini’s current APIs include:
With these APIs, users can tap into meaningful semantic CSS (thanks to the Typed Object Model), and even apply semantics to their CSS variables (Properties and Values). With the Paint API, you can draw a canvas and have it applied as a border image (hello, gradient borders), or create animated sparkles (link) that accept dynamic arguments and are implemented with a single line of CSS.
.sparkles {
background: paint(sparkles)
}
You can build round menus without placing the items manually through margins (via the Layout API), and you can integrate your own interactions that live off of the main thread (using the Animation Worklet).
Houdini is definitely one to watch in the new year, and now is a great time to start experimenting with it if you haven’t yet.
Variable fonts
Another technology that falls in line with the goal of making websites more performant while offering more user extensibility is variable fonts. With so many new variable fonts popping up — and Google Fonts’ recent beta launch — variable fonts are now more available and easy to use than ever.
Variable fonts are vector-based and allow for a broad range of values to be set for various font axes, like weight and slant. The interpolation of these axes allows fonts to transition smoothly between points.
Here’s an example:
Variable fonts also allow for new axes to help designers and developers be even more creative with their work. Here’s an example of some of those from an excellent resource called v-fonts:
Variable fonts are relatively well supported, with 87% of modern browsers supporting the required font format.
Custom Properties
Custom properties, like variable fonts, are also well supported. While they’re not new, we’re still discovering all of the things we can do with custom properties.
Custom properties allow for truly dynamic CSS variables, meaning we can adjust them in JavaScript, separating logic and style. A great example of this comes from David Khourshid, who shows us how to create reactive animations and sync up the styling without sweating it.
We’re also starting to experiment with more logic in our stylesheets. I recently published a blog post that explains how to create dynamic color themes using the native CSS calc() function, along with custom properties.
This eliminates the need for additional tools to process our CSS, and ensures that this technique for theming works across any technology stack — which brings me to my next 2020 vision: interoperability.
Interoperability
Interoperability, by my definition in this post, means the ability to work between technologies and human needs. From a technical perspective, with the fragmented web, a lot of companies have migrated stacks in the recent past, or have multiple internal stacks, and are now likely interested in safeguarding their technology stack against future changes to maintain some semblance of uniformity.
Web components
Web components try to solve this problem by attacking the problem of component-based architecture from a web-standards perspective. The vision is to introduce a standard format that can be used with or without a library, benefiting the developer experience and establishing uniformity between components.
Each web component is encapsulated and works in modern browsers without dependencies. This technology is still evolving and I think we’ll see a lot of growth in 2020.
Logical properties
Logical properties challenge us to adjust our mental model of how we apply layout sizing on a page in order for us to make our pages more friendly across languages and reading modes. They allow for our layouts to be interoperable with user experiences.
In English, and other left-to-right languages, we think of the layout world in terms of height and width, and use a compass-type expression for margins, border, and padding (top, left, bottom, right). However if we style this way and then adjust the language to a right-to-left language, like Arabic, the padding-left of our paragraphs no longer means padding from the beginning of where we would read. This breaks the layout.
If you were to write padding-inline-start instead of padding-left, the padding would correctly swap to the other side of the page (the start of where one would be reading) when switching to the right-to-left language, maintaining layout integrity.
Preference media queries
Preference media queries are also on the rise, with more capability coming in 2020. They allow us to tailor our sites to work with people who prefer high contrast or dark mode, as well as people who prefer a less animation-heavy experience.
In this video, I go over how to create a preference media query for dark mode, using custom properties for styling:
Runner up: Speed
Speed is also a topic I see as a big focus of the web world in 2020. Several of the technologies I mentioned above have the benefit of improving web performance, even if it isn’t the main focus (e.g. how variable fonts may reduce the total weight of fonts downloaded). Performance becomes increasingly important when we think about the next billion users coming online in areas where network speeds may be lacking.
In addition, Web Assembly, which is a wrapper that lets users write closer to the browser metal, is gaining popularity. I also foresee a lot more work with WebGL in the coming year, which uses similar techniques for advanced and speedy graphics rendering. Writing lower-level code allows for speedier experiences, and in some cases of WebGL, may be required to prevent advanced visualization from crashing our browsers. I think we’ll see these two technologies grow and see more WebGL demos in 2020.
The web is constantly evolving and that’s what makes it so exciting to be a part of. What do you see as a goal or technology to watch in 2020? Tell us in the comments!
Here’s a smart post from Manuel Matuzovic where he digs into why accessibility is so important for building websites:
Web accessibility is not just about keyboard users, color contrast or screen readers. Accessibility is a perfect indicator for the quality of a website. Accessibility is strongly interlocked with other areas of web design and web development. If your website is accessible, it usually means that it’s inclusive, resilient, usable, it offers great UX for everyone, and it’s fast.
I love this idea: that you can’t have a good UI that isn’t also accessible and how accessibility, performance, and quality are all intermingled with one another. Actually, this has me thinking… I’ve never worked on a project where either of these things are the problem in isolation. It’s all of them, always.