How do you like this extension?
Smart Speculations Rules for Magento 2
Instant Page Navigations With Smart Prerendering/Prefechting Via Speculations Rules API
Be smart and make your Magento site smart!
Prerender/Prefetch pages even before users click a link.
Predictive speculative loading based on visitors browsing behavior in the past as well as dynamic speculations on user interaction.
Upgrade Your Magento Store
Performance & User Experience:
- Ultra-Fast UX / Instant Page Views
Thanks To Prerendering in Background - Smart Speculative Loading
With Predictive Prerendering/Prefetching - Data-Driven Speculation Rules Based
On Google Analytics Or Matomo Data - Continuously Learning & Improving,
Auto Adapting To Content Changes - Dynamic Prerendering/Prefetching
Based On User Interaction - Flexibly And Easily Configurable To Work Seamlessly With Your Magento Store
- Fixes Magento Incompatibility With Speculations Rules API
License:
- One-Time Payment
- Lifetime Access To Source Code
- 1 Year Free Support
- 1 Year Free Updates
Approved & Verified by Magento Marketplace
1st Extension Provider
With Hyvä Support
Awesome since 2021!
Unencrypted. 100% Open Source & Customizable
Coding Standards Applied. Clean & Readable Code
Countless Satisfied Customers: Be The Next One!
Made With Love
Our extensions are made with love & passion for building new things, perfection & performance in mind.
Field Tested
Our extensions are field-proven in our own client projects.
Customer Feedback
We use the Ultimate Image Optimizer extension. The performance has improved considerably. The tool has been running smoothly right from the start.
We commissioned a really tricky adjustment to an extension that other agencies couldn't manage...and the guys at JaJuMa did a fantastic job! We are happy to continue working with JaJuMa.
We are very satisfied with this module. It reduces the sizes of our images and so the loading of our pages are much more faster now. We recommand this module for everybody!!!
- General Configs
- Data Source - General Configs
- Data Source Configs - Google Analytics
- Data Source Configs - Matomo Analytics
- Data-Based / Predictive Speculation Rules
- Dynamic Speculation Rules
- Manual Speculation Rules
- Speculation Data Cron Jobs
- Speculations Rules Debug Tool
Configurations & Screenshots
Solution
The First And Only Speculation Rules API Extension With 100% Compatibility For Magento 2
With Smart Predictive Prerendering Based On Your Customers Behavior And Typical Click Paths In Your Store.
Dynamic Speculation Rules without manually creating & maintaining rules in a .json + extra boost.
For Instant Page Navigations...
Performance & User Experience Boost
for Your Magento 2 Store!
THE PROBLEM
PERFORMANCE
SPEED
FASTER
Simply speaking, the typical performance optimization is trying one or both of:
- Reduce the amount of data that needs to be downloaded by users Browser
- Try to get the data down the wire to the user as fast as possible
- Load and process this data efficiently and in correct order follow their priority
But there are more, often overseen, levers to improve the performance of Magento stores.
One of them is getting data down the wire to the customer ahead of time, even before the customer clicks a link.
A quite powerful approach for performance optimization that we have been using in the past for example with our
Page Preload extension.
Now there is another one, even more advanced option for this available: The Speculation Rules API.
Read on to learn how our extension will help you to get the most out of this new Speculation Rules API. And how you can now upgrade your Magento store performance & user experience to a new level.
THE SOLUTION
SMART
SPECULATIONS
RULES
See how JaJuMa Smart Speculations Rules will help you level-up the performance & user experience
of your Magento 2 store:
The extension will fetch your tracking data from Google Analytics or
Matomo Analytics.
Based on this tracking data, the typical click path of your customers and click probabilities for links
are determined.
Links with highest click probabilities can be prerendered or prefetched
with high priority by the browser in the background.
Prerendered means, the browser will download the HTML, JS, CSS, fonts as well as images etc and
fully process the page - just like when a page is opened normally.
By this, the page will be fully available when user later clicks on this link and needs to be only restored from memory.
Furthermore, our extension allows you to easily add configurations to let the browser prerender/prefetch additional links based
on user-interaction (hover on desktop / pointerdown on mobile) without manually creating & maintaining speculation rules as .json.
Optionally, these dynamic speculations can be triggered without a 200ms delay and 10 instead of 2 concurrent prerenders as with manual json rules.
By this, our module allows you to get the most benefit from the Speculation Rules API.
Exploiting the limits defined by browsers for speculative loading while finding the balance between cost and efficiency
as well as considering desktop and mobile users.
Read more below about how this extension works and why this is a
huge improvement for your Core Web Vitals Field Data!
Highlights
Smart Speculations Rules by JaJuMa-Develop
The Performance & User Experience
Boost Extension For Magento 2.
Upgrade Your Core Web Vitals Field Data!
Performance Optimization
For Rocket Speed
And Top Core Web Vitals
Instant Page
Navigations
Via Speculations Rules API
User Experience
Optimization
For Happy Customers
Predictive
Prerendering
Based On Analytics Data
Prerendering
Before User Click/Hover
For High-Traffic Pages
Continuously Learning
And Improving
Click Predictions
Automatically Adapting
Speculations Rules
To Changed/New Content
Automatically Adjusting
Speculations Rules
To Changed User Behavior
Prerendering
On User Interaction
When User Hovers/Tab's Links
Dynamic
Speculation Rules
Without Manually Creating/Maintaining Rules As .json
Dynamic Rules
With Extra Boost
Configurable/No Delay, More Concurrent Speculations
The Only 100%
Magento Compatible
Speculations Rules
Integration Available
Different
Speculations Strategies
Supported
Speculations Data
Available For Analysis
In Backend & As Download
Optionally Measure
Your Prerender Ratio
In Google Analytics/Matomo
Debug Tool
To Easily Verify
And See The Module Work
Flexibly And Easily
Configurable To Work
Seamlessly With Your Magento Store
Google Analytics
Supported
As Data Source
Matomo Analytics
Supported
As Data Source
Details
Smart Speculations Rules Extension for Magento 2 by JaJuMa In Detail.
Instant Page Navigations With Prerendering/Prefetching for Magento 2.
Improve your User Experience and Core Web Vitals
What Is The Speculation Rules API?
"Speculation Rules API": The Latest Hot Thing To Boost The Performance Of Your Magento 2 Store
The Speculation Rules API for prefetching/prerendering is a technology used by Google Chrome and other Browsers
to create a faster browsing experience. It allows predictive prerendering/prefetching as well as on user interaction.
The API prefetches/prerenders the anticipated webpage in the background, before the user even clicks a link,
making it available instantly if the user decides to open it.
It’s also designed to pause the prerendering process if it uses up too many resources,
ensuring a balanced use of system capacities.
Ready to learn more on how JaJuMa Smart Speculations Rules will help you to get the most from
Speculative prerendering thanks to smart data-driven speculation rules?
See below how it works and how the predictive prerendering/prefetching is continuously learning and adapting to your site.
This extension uses Google Analytics API OR Matomo Analytics API.
Using Matomo Analytics API is free, but using Google Analytics API is only free within a certain quota.
The module includes options to avoid exceeding the free quota.
However, at least for bigger sites additional costs for using the Google API may occur depending on how fast/frequently data is updated.
Why Should I Use Prerendering/Prefetching Via Speculation Rules In My Magento 2 Store?
Via Prerendering/Prefetching reduced Core Web Vitals directly affect your Core Web Vitals (CWV) Field Data.
The benefit won't be visible with lab data as shown e. g. by Google Page Speed.
However, the ranking relevant field data numbers as reported by your users, will benefit from a direct positive impact.
Prerendering/Prefetching Provides Multiple Benefits For Magento 2 Stores:
- Enhanced Site Performance: Prerendering/Prefetching via Speculation Rules API can dramatically improve a Magento Stores Core Web Vitals Field Data. Since loading and rendering are performed in background, customer page navigations for prerendered pages are instant with outstanding CWVs.
- Improved User Experience: Since pages are rendered in advance, users experience almost instant page loading. This significantly boosts the user experience and customer satisfaction.
- Increase in Sales: Faster page load speed can reduce bounce rates and might lead to increased conversion rates. Customers are more likely to make a purchase when they do not have to wait long for pages to load.
- Better SEO Rankings: Search engines, like Google, favor websites with quicker load times. Prerendering/Prefetching your Magento store pages can help improve SEO and lead to higher rankings in search results.
Smart vs. Dynamic vs. Manual Speculation Rules
Please see comparison between Smart, Dynamic and Manual Speculation Rules below to understand how each option works and how to define and configure the speculation strategy that fits your needs:
Smart
Speculation Rules:
- Data-driven / predictive speculations based on Google Analytics or Matomo Analytics data
- Speculations based on click probabilities calculated individually for Desktop, Mobile & Tablet screens
- 2 separate probability ranges for speculative prerender & prefetching
- Predictive speculations only triggered for links in viewport
- Max concurrent speculations:
10 prerenders / 50 prefetches
Dynamic
Speculation Rules:
- Speculations triggered by user interaction (hover/pointerdown)
- With eagerness "moderate"
=> 200ms delay
=> max concurrent speculations:
2 prerenders / 2 prefetches
OR - With eagerness "immediate":
=> Configurable / No delay
=> max concurrent speculations:
10 prerenders / 50 prefetches
Manual
Speculation Rules:
- Manually as .json defined and maintained speculation rules
How Smart Speculations Prerendering/Prefetching For Magento 2 Works
Collect & Prepare
Speculations
Data
As a first step, the module collects "Speculations Data" from your Google Analytics
or Matomo Analytics tracking data.
Based on collected tracking data, the probability for a link to be "clicked next"
by your customer gets calculated.
For max accuracy, these probabilities are calculated individually for Desktop, Mobile & Tablet
The Speculations Data gets constantly updated in order to continuously learn and
improve based on your customers behavior and to automatically adapt
to any content changes on your Magento site.
This process works fully automated via cron jobs to make sure your Speculations Data is always up-to-date.
Of course, JaJuMa Smart Speculations Rules has also measures and
options in place to keep your Speculations Data clean and
adapt it to your custom site structure by excluding certain links and URL parameters.
As well as options to keep collecting and processing Speculations Data
lean and cost efficient to suit your needs.
Add Speculation Rules
For Magento Stores
But Smart!
For each URL on your site individually, the extension will add the
links anticipated to be the "next clicked link" with high probability
based on the Speculations Data as Speculation Rules with high priority.
This means, the prerendering/prefetching will start as soon as possible,
but only for links visible/in viewport to avoid wasted resources, have a good chance the prerendering is already completed when the user actually clicks the link.
As a result, your customer has the fastest possible browsing experience and
these instant page navigations will also reflect in
improved Core Web Vitals field data.
With our extension you have full control over the prerendering/prefetching:
Configure the max number of links to be added for prerender/prefetch, allow prerendering/prefetching only for links with a
probability to be clicked above a certain threshold or exclude certain URLs from prerendering/prefetching altogether.
How Dynamic Speculations Prerendering/Prefetching For Magento 2 Works
Dynamically Trigger
Speculations
On User-Interaction
With this extension you do not need to define and maintain speculation rules as .json anymore.
(But you can still can of course)
Instead of manually creating and keeping your speculation rules .json up-to-date, you can now have
speculations triggered on user-interaction dynamically and fully automatically.
As additional benefit, for dynamically added speculations you can choose between eagerness "moderate" or "immediate".
While "moderate" speculations are triggered with a delay of 200ms and come with max 2 concurrent prerenders/prefetches,
speculations with eagerness "immediate" are triggered with configurable or NO delay and allow max 10 concurrent prerenders or 50
concurrent prefetches.
In other words, with eagerness "immediate" you get a better chance prerenders are complete until user actually views
a prerendered page and a reduced CPU usage on client-side due to less repeated prerendering.
Of course, JaJuMa Smart Speculations Rules also provides the option to exclude certain URLs from dynamic speculations via Blacklist.
Different Speculations Strategies Supported
Now you can implement Speculation Rules in your Magento 2 store following a layered approach with multi-tiers for triggering speculative prefetches and prerenders.
See below example speculations strategies to get an idea how to find the strategy that is most suitable for your Magento 2 store:
Conservative Speculation Strategy
This strategy aims at
- Reducing cost for speculations by using "immediate" only for prefetches (rather low cost) and using prerendering (more costly) only for links with very high probability to be clicked (= user already interact with the link).
- While still leveraging the data-driven predictive speculations for optimizing the result.
The idea with the "Conservative Speculations Strategy" is a prerender/prefetch approach with 2 stages:
- Stage:
Links with high probability to be clicked next based on analytics data will be added as speculation rule
- type = "prefetch"
- source = "list" and
- eagerness "immediate"
The Browser will try to prefetch (= download the main document) these links as fast as possible when visible. - Stage:
Links with very high probability to be clicked next will be be added as speculation rule
- type = "prerender"
- source = "document" and
- eagerness = "moderate"
The browser will start prerendering these links on user interaction (i. e. when user hover the link)
with 200ms delay and max 2 concurrent prerenders.
With this approach, for the high probability links prefetched in 1. Stage, we have a higher chance the prerender in Stage 2 will actually complete before the user see the page.
Data Driven Speculation Strategy
This strategy aims at
- Prerendering as much as reasonable by combining predictive data-based & user interaction triggered prerendering, for higher chance the next click will be prerendered.
- While trying to still have a good benefit/cost balance, but accepting somewhat more waste of resources.
The idea with the "Data Driven Speculation Strategy" is a prerender approach with 2 stages:
- Stage:
Links with high probability to be clicked next based on analytics data will be added as speculation rule
- type = "prerender"
- source = "list" and
- eagerness "immediate"
The Browser will try to fully prerender these links as fast as possible when visible. - Stage:
Links with very high probability to be clicked next will be be added as speculation rule
- type = "prerender"
- source = "document" and
- eagerness = "moderate"
The browser will start prerendering these links on user interaction (i. e. when user hover the link)
with 200ms delay and max 2 concurrent prerenders.
With this approach, the prerender intensity will be somewhat higher as links with a good confidence to be clicked next
based on analytics data are prerendered instead of only prefetched.
The "All-In" Speculation Strategy
This strategy aims at
- Prefetching/Prerendering as much as possible by combining predictive data-based prefetching & prerendering PLUS dynamically user interaction triggered prerendering, for higher chance the next click will be prerendered.
- While trying to still have a good benefit/cost balance, but accepting somewhat more waste of resources.
The idea with the "All-In Speculation Strategy" is a layered speculative prefetch/prerender approach with 3 tiers:
- Stage:
Links with high probability to be clicked next based on analytics data will be added as speculation rule
- type = "prefetch"
- source = "list" and
- eagerness "immediate"
The Browser will try to fully prefetch these links as fast as possible when visible. - Stage:
Links with higher probability to be clicked next based on analytics data will be added as speculation rule
- type = "prerender"
- source = "list" and
- eagerness "immediate"
The Browser will try to fully prerender these links as fast as possible when visible. - Stage:
Links with very high probability to be clicked next will be be added as speculation rule
- type = "prerender"
- source = "document" and
- eagerness = "immediate"
The browser will start prerendering these links on user interaction (i. e. when user hover the link)
with NO delay (configurable) and max 10 concurrent prerenders.
With this approach, the prerender intensity will be higher, with 3 layers of prioritized prefetching/prerendering
and utilizing the Browser limits for speculations to the maximum
for achieving the highest
chance links are successfully prerendered.
Please see our Page Preload extension that allows to preload pages similar to prefetching with Speculations Rules API, but works with non-Chrome browsers as well.
What Is The Best Strategy For Prerendering/Prefetching Via Speculation Rules API?
It Depends...
Generally speaking, you have X seconds from page load to user's next click to prefetch or ideally prerender the next page.
Prerendering/Prefetching more or as much as possible could help to achieve this goal...
BUT:
- The sooner you prefetch/preload the next link, the higher the chance the prefetch/preload can be completed before the user clicks the link.
- The more prefetch/preload you do, the more resources will be wasted. Both, on your server as well as on your clients device
- Prefetching/Prerendering too much can have a negative impact on your sites performance and your users experience
So the actual goal is to prerender
- as targeted as possible by finding the links with high probability/confidence to be clicked and
- focus your prerendering on these and
- to find a balance between prerendering enough while still reducing the cost and waste of resources
With the data-driven approach and the configuration options provided by JaJuMa Smart Speculations Rules you are perfectly equipped to reach these goals as good as possible!
Further recommendations to find the best strategy for prerendering/prefetching via Speculation Rules API
With JaJuMa Smart Speculations Rules you can see the speculations data including calculated click probabilities in your backend.
Additionally, there is an option to download this data for further analysis.
-> Review this data to find the best strategy for your case.
Consider the cost for using speculation rules and choose a strategy that fits your situation and willingness to cover the cost for additional traffic.
Are you using Hyvä Themes? Build your site "Hyvä Style", loading only one CSS file
(or even no CSS file using Hyvä Inline CSS),
only one JS file or at least deferred all the heavy JS work until after user interaction (= will not be processed by prerender requests)?
In that case, with such a lightweight Frontend, the costs for prerendering will be lower than for example with Luma that is rather heavy on JS.
-> And lower costs means you should be able to prerender more...
Write Your Review
Frequently Asked Questions
Changelog
Version: 1.0.0
- Initial Release
Version: 2.0.0
- Added: Dynamic Speculation Rules triggered on user-interaction
- Improvement: Click probabilities are now calculated for desktop/tablet/mobile separately
- Improvement: Predictive speculations are now only triggered for links in viewport
- Improvement: Predictive speculations can now be added for prefetch & prerender with separate click probability ranges
- Improvement: Reduced Google Analytics API calls
- Improvement: Improved Storeview support
Version: 2.0.1
- Added: Compatibility with Content Security Policy
- Improvement: Support for prerender/prefetch dynamically added links via dynamic speculation rules
- Improvement: Configurable delay for dynamic speculation rules (with eagerness immediate)
More Extensions
Maybe also interesting for you?
More valuable Extensions and Add-Ons for your Magento Store