You are currently viewing SEO Forecasting in Google Sheets

SEO Forecasting in Google Sheets

  • Post author:
  • Post category:SEO

Posted by Tom.Capper

Way back in 2015, I published an article giving away a free, simple, forecasting tool, and talking through use cases for forecasting in SEO. It was a quick, effective way to see if a change to your site traffic is some kind of seasonality you can ignore, something to celebrate, or a worrying sign of traffic loss.

In short: you could enter in a series of data, and it would plot it out on a graph like the image above.

Five years later, I still get people โ€” from former colleagues to complete strangers โ€” asking me about this tool, and more often than not, Iโ€™m asked for a version that works directly in spreadsheets.

I find this easy to sympathize with: a spreadsheet is more flexible, easier to debug, easier to expand upon, easier to maintain, and a format that people are very familiar with.

The tradeoff when optimizing for those things is, although Iโ€™ve improved on that tool from a few years ago, Iโ€™ve still had to keep things manageable in the famously fickle programming environment that is Excel/Google Sheets. That means the template shared in this post uses a simpler, slightly less performant model than some tools with external code execution (e.g. Forecast Forge).

In this post, Iโ€™m going to give away a free template, show you how it works and how to use it, and then show you how to build your own (better?) version. (If you need a refresher on when to use forecasting in general, and concepts like confidence intervals, refer to the original article linked above.).

Types of SEO forecast

There is one thing I want to expand on before we get into the spreadsheet stuff: the different types of SEO forecast.

Broadly, I think you can put SEO forecasts into three groups:

  1. โ€œIโ€™m feeling optimistic โ€” add 20% to this yearโ€ or similar flat changes to existing figures. More complex versions might only add 20% to certain groups of pages or keywords. I think a lot of agencies use this kind of forecast in pitches, and it comes down to drawing on experience.
  2. Keyword/CTR models, when you estimate a ranking change (or sweeping set of ranking changes), then extrapolate the resulting change in traffic from search volume and CTR data (you can see a similar methodology here). Again, more complex versions might have some basis for the ranking change (e.g. โ€œWhat if we swapped places with competitor A in every keyword of group X where they currently outrank us?โ€).
  3. Statistical forecast based on historical data, when you extrapolate from previous trends and seasonality to see what would happen if everything remained constant (same level of marketing activity by you and competitors, etc.).

Type two has its merits, but if you compare the likes of Ahrefs/SEMRush/Sistrix data to your own analytics, youโ€™ll see how hard this is to generalize. As an aside, I donโ€™t think type one is as ridiculous as it looks, but itโ€™s not something Iโ€™ll be exploring any further in this post. In any case, the template in this post fits into type three.

What makes this an SEO forecast?

Why, nothing at all. One thing youโ€™ll notice about my description of type three above is that it doesnโ€™t mention anything SEO-specific. It could equally apply to direct traffic, for example. That said, there are a couple of reasons Iโ€™m suggesting this specifically as an SEO forecast:

  • Weโ€™re on the Moz Blog and Iโ€™m an SEO consultant.
  • There are better methodologies available for a lot of other channels.

I mentioned that type two above is very challenging, and this is because of the highly non-deterministic nature of SEO and the generally poor quality of detailed data in Search Console and other SEO-specific platforms. In addition, to get an accurate idea of seasonality, youโ€™d need to have been warehousing your Search Console data for at least a couple of years.

For many other channels, high quality, detailed historic data does exist, and relationships are far more predictable, allowing more granular forecasts. For example, for paid search, the Forecast Forge tool I mentioned above builds in factors like keyword-level conversion data and cost-per-click based on your historical data, in a way that would be wildly impractical for SEO.

That said, we can still combine multiple types of forecast in the template below. For example, rather than forecasting the traffic of your site as a whole, you might forecast subfolders separately, or brand/non-brand separately, and you might then apply percentage growth to certain areas or build in anticipated ranking changes. But, weโ€™re getting ahead of ourselvesโ€ฆ

How to use the template

FREE TEMPLATE

The first thing youโ€™ll need to do is make a copy (under the โ€œFileโ€ menu in the top left, but automatic with the link Iโ€™ve included). This means you can enter your own data and play around to your heartโ€™s content, and you can always come back and get a fresh copy later if you need one.

Then, on the first tab, youโ€™ll notice some cells have a green or blue highlight:

You should only be changing values in the colored cells.

The blue cells in column E are basically to make sure everything ends up correctly labelled in the output. So, for example, if youโ€™re pasting session data, or click data, or revenue data, you can set that label. Similarly, if you enter a start month of 2018-01 and 36 months of historic data, the forecast output will begin in January 2021.

On that note, it needs to be monthly data โ€” thatโ€™s one of the tradeoffs for simplicity I mentioned earlier. You can paste up to a decade of historic monthly data into column B, starting at cell B2, but there are a couple of things you need to be careful of:

  • You need at least 24 months of data for the model to have a good idea of seasonality. (If thereโ€™s only one January in your historic data, and it was a traffic spike, how am I supposed to know if it was a one-off thing, or an annual thing?)
  • You need complete months. So if itโ€™s March 25, 2021 when youโ€™re reading this, the last month of data you should include is February 2021.

Make sure you also delete any leftovers of my example data in column B.

Outputs

Once youโ€™ve done that, you can head over to the โ€œOutputsโ€ tab, where youโ€™ll see something like this:

Column C is probably the one youโ€™re interested in. Keep in mind that itโ€™s full of formulas here, but you can copy and paste as values into another sheet, or just go to File > Download > Comma-separated values to get the raw data.

Youโ€™ll notice Iโ€™m only showing 15 months of forecast in that graph by default, and Iโ€™d recommend you do the same. As I mentioned above, the implicit assumption of a forecast is that historical context carries over, unless you explicitly include changed scenarios like COVID lockdowns into your model (more on that in a moment!). The chance of this assumption holding two or three years into the future is low, so even though Iโ€™ve provided forecast values further into the future, you should keep that in mind.

The upper and lower bounds shown are 95% confidence intervals โ€” again, you can recap on what that means in my previous post if you so wish.

Advanced use cases

You may by now have noticed the โ€œAdvancedโ€ tab:

Although I said I wanted to keep this simple, I felt that given everything that happened in 2020, many people would need to incorporate major external factors into their model.

In the example above, Iโ€™ve filled in column B with a variable for whether or not the UK was under COVID lockdown. Iโ€™ve used โ€œ0.5โ€ to represent that we entered lockdown halfway through March.

You can probably make a better go of this for the relevant factors for your business, but there are a few important things to keep in mind with this tab:

  • Itโ€™s fine to leave it completely untouched if you donโ€™t want to add these extra variables.
  • Go from left to right โ€” itโ€™s fine to leave column C blank if youโ€™re using column B, but itโ€™s not fine to leave B blank if youโ€™re using C.
  • If youโ€™re using a โ€œdummyโ€ variable (e.g. โ€œ1โ€ for something being active), you need to make sure you fill in the 0s in other cells for at least the period of your historic data.
  • You can enter future values โ€” for example, if you predict a COVID lockdown in March 2021 (you bastard!), you can enter something in that cell so itโ€™s incorporated into the forecast.
  • If you donโ€™t enter future values, the model will predict based on this number being zero in the future. So if youโ€™ve entered โ€œbranded PPC activeโ€ as a dummy variable for historic data, and then left it blank for future periods, the model will assume you have branded PPC turned off in the future.
  • Adding too much data here for too few historic periods will result in something called โ€œoverfitโ€ โ€” I donโ€™t want to get into detail on this, which is why this tab is called โ€œAdvancedโ€, but try not to get carried away.

Hereโ€™s some example use cases of this tab for you to consider:

  • Enter whether branded PPC was active (0 or 1)
  • Enter whether youโ€™re running TV ads or not
  • Enter COVID lockdowns
  • Enter algorithm updates that were significant to your business (one column per update)

Why are my estimates different to your old tool? Is one of them wrong?

Thereโ€™s two major differences in method between this template and my old tool:

  • The old tool used Googleโ€™s Causal Impact library, the new template uses an Ordinary Least Squares regression.
  • The old tool captured non-linear trends by using time period squared as a predictive variable (e.g. month 1 = 1, month 2 = 4, month 3 = 9, etc.) and trying to fit the traffic curve to that curve. This is called a quadratic regression. The new tool captures non-linear trends by fitting each time period as a multiple of the previous time period (e.g. month 1 = X * month 2 where X can be any value). This is called an AR(1) model.

If youโ€™re seeing a significant difference in the forecast values between the two, it almost certainly comes down to the second reason, and although it adds a little complexity, in the vast majority of cases the new technique is more realistic and flexible.

Itโ€™s also far less likely to predict zero or negative traffic in the case of a severe downwards trend, which is nice.

How does it work?

Thereโ€™s a hidden tab in the template where you can take a peek, but the short version is the โ€œLINEST()โ€ spreadsheet formula.

The inputs Iโ€™m using are:

  • Dependent variables
    • Whatever you put as column B in the inputs tab (like traffic)
  • Independent variables
    • Linear passing of time
    • Previous periodโ€™s traffic
    • Dummy variables for 11 months (12th month is represented by the other 11 variables all being 0)
    • Up to three โ€œadvancedโ€ variables

The formula then gives a series of โ€œcoefficientsโ€ as outputs, which can be multiplied with values and added together to form a prediction like:

  • โ€œTime period 10โ€ traffic = Intercept + (Time Coefficient * 10) + (Previous Period Coefficient * Period 9 traffic)

You can see in that hidden sheet Iโ€™ve labelled and color-coded a lot of the outputs from the Linest formula, which may help you to get started if you want to play around with it yourself.

Potential extensions

If you do want to play around with this yourself, here are some areas I personally have in mind for further expansion that you might find interesting:

  • Daily data instead of monthly, with weekly seasonality (e.g. dip every Sunday)
  • Built-in growth targets (e.g. enter 20% growth by end of 2021)

Richard Fergie, whose Forecast Forge tool I mentioned a couple of times above, also provided some great suggestions for improving forecast accuracy with fairly limited extra complexity:

  • Smooth data and avoid negative predictions in extreme cases by taking the log() of inputs, and providing an exponent of outputs (smoothing data may or may not be a good thing depending on your perspective!).
  • Regress on the previous 12 months, instead of using the previous 1 month + seasonality (this requires 3 yearsโ€™ minimum historical data)

I may or may not include some or all of the above myself over time, but if so Iโ€™ll make sure I use the same link and make a note of it in the spreadsheet, so this article always links to the most up-to-date version.

If youโ€™ve made it this far, what would you like to see? Let me know in the comments!

Sign up for The Moz Top 10, a semimonthly mailer updating you on the top ten hottest pieces of SEO news, tips, and rad links uncovered by the Moz team. Think of it as your exclusive digest of stuff you don’t have time to hunt down but want to read!