pixel
User Probe Logo
FAQPricingSign InGet Started

PWA Case Study: Pinterest

Investing and improving website performance has directly impacted the Pinterest bottom line, Logins are up by 370% and new signups increased by 843% year-over-year.

In 2017 the Pinterest web platform and growth teams, teamed up to rebuild the pintrest mobile web from scratch.

Why:

  • Users did not like the current web app or want to download a native app to look at pictures.
  • The mobile website was just an upsell for the native app
  • Number of users that downloaded the app vs website visitors was very low

The Results

Over Three month period, a new progressive web app was built and shipped with some fairly incredible results

It was 4x faster for initial page loads, and 6x faster for cached widgets. The javascript bundle size was reduced from 650kb to 200kb. CSS decreased from 160kb to just 6kb (inclined into the app)

Performance Entropy

Pinterest have 100+ web engineers, committing to the code base, So it was important the new experience stayed fast over time. The solution is performance budgets, Three main steps;

Logging

Javascript bundle size is logged in real time to an internal logging system using a custom built webpack plugin

Alerting

Focused on core bundles, alerting if a large import bump is detected. This could be caused by a single import.

Prevention

A single import could add hundreds of kilobytes to the bundle, to prevent this a custom eslint plugin was written to prevent imports from specific paths. For example on the mobile-only codebase should not be allowed to import from the desktop only codebase.

Composite Performance

Composite metric lets you define a higher level metric specific to your app, this is frequently measuring what your users care about. At Pinterest, a new metric named Pinner Wait Time (PWT) was created - Pinterest users come to see images, PWT metric tracks the time to interactive + Above the fold image load times. This was used in combination with time to first paint, and time to interactive. These essential for debugging performance regression.

Experiments

Pinterest runs hundreds of experiments and A/B tests at any one time, so performance regression data was added to the optimise dashboard. This increased visibility and kept engineers aware of performance impact caused by experiments.

Business results

Year on year worldwide +103% increase on weekly users, and +300% increase in session length. And the mobile website has become the number one platform for new user signups (surpassing desktop, and native apps).

Continued growth, particularly in emerging markets where bandwidth is limited and low-end devices, are common. In such low bandwidth areas, weekly users had increased by 300% and the number of pins had increased by over 600% - The number of pins Pinterest sees is directly correlated with overall revenue,

Sources

Join Pinterest, focus on Web App performance