Web Optimization for Single Page Apps (SPA)

By Luke Hardwick

September 17, 2018

Share

Single Page Applications (SPA) have become increasingly popular over the past decade as they offer big benefits for developers and users. However, because their design is different from traditional websites, they cause a few difficulties for marketing, analytics, and SEO. First, SPAs can make it harder to track user data because of how they define sessions and measure different pages. Second, SPAs can hurt SEO, since they’re a bit harder for Googlebot and other search engines to crawl. Finally, most marketers don’t have the code-heavy skill set that seems required for optimization testing on SPAs with their A/B testing tools, so instead they must rely on developers to create and implement variations. Fortunately, there are pretty simple solutions to these problems. By working with clients across industries, SPA frameworks and libraries, I’ve gained a lot insights into how to deliver accurate analytics and make your SPAs more effective without theses downsides.

binary code with the letters "SPA" in orange

What is a Single Page App?

First, you’ll need to understand what a Single Page App is and how it is unique. In short, a Single Page App is a website that behaves like an app. When you go to an SPA all of the JavaScript for the entire website downloads from the server just once. When you download the homepage, you’re also downloading the code for every other page. Normally, each time you navigate somewhere on a webpage that request must go back to the server before it’s delivered. With an SPA, clicking a button or using a feature requires no additional communication with the server to build the page. That’s huge — you get a very fast site and an incredible user experience.

For an example, think of Gmail. Open your inbox, then turn off your wifi. You can still open your emails. They have already loaded from the server so these additional clicks don’t require another communication. That makes for a pretty stellar user experience.

Click to Learn How to Include SPA Testing With SiteSpect

Common SPA Problems

While on the whole SPA allow a smoother and more satisfying user experience, if you’re a marketer tasked with running A/B testing and multivariate testing and optimization on an SPA, you may run into some difficulties.

You may see a disruption or errors in your analytics. Because SPA pages work differently, you’ll need to update your analytics parameters including redefining pages. Once you do this, you should have no problem with tracking your campaigns.

Your A/B testing tool may not work with your SPA library. There are several frameworks (some common ones are React and Angular), and integration with these libraries will be key. SiteSpect integrates with any SPA framework but integration problems may come up with other vendors you may be using for AI, search, or anything else.

It will be even more important that you can A/B test both server side and client changes within the same tool and even within the same campaign. Sacrificing that ability will cause friction both within your optimization strategy and between the marketing and development resources necessary to accomplish these goals.

Designing Server Side and Client Side Variations

Because of the technical complexity of SPA, most of the time marketers have to defer to their developer colleagues to implement any site variations — even ones that are entirely client-side and normally wouldn’t require dev resources. For any team this can tie up resources and slow down A/B tests and marketing initiatives, and tie up dev resources that might be spent elsewhere. In A/B testing tools with no code-free option for dealing with SPAs, this can be enough to halt an entire project.

Check out the visual editor

SiteSpect actually enables business users to design variations and implement changes through the visual editor. This requires no coding, no dev resources, and can be implemented immediately. When you do need to implement server side changes, you can do so through SiteSpect without modifying the original JavaScript code. This simplifies the operation, and enables full freedom to A/B test, optimize, and maintain your SPA.

To learn more about SiteSpect, visit our website.

 

Share

Luke Hardwick

Luke Hardwick

Luke Hardwick is a Manager of Customer Success at SiteSpect, consulting for SiteSpect users on their optimization and personalization road maps and projects. Luke is based in London and has experience as an conversion rate optimization specialist across many softwares before landing at SiteSpect.

Suggested Posts

Subscribe to our blog: