A "page views" saving Wized loading mechanism

Incorporating third-party tools like Wized can sometimes come at the cost of increased page load times and unnecessary resource consumption. In this blog post, we'll explore a clever solution—a Wized loading mechanism designed to minimize page views and streamline the user experience. Let's delve into how this advanced Wized loader works and how it can benefit your website.

Code screenshot for implementing a "page views" saving Wized loading mechanism
Leon Barth
CEO at BMG.studio

Understanding the Challenge

Before delving into the solution, let's first grasp the challenge at hand. Integrating third-party scripts like Wized into a website poses a dilemma for developers. On one hand, these tools offer valuable functionality, such as interactive learning modules and course content. On the other hand, they can significantly impact page load times, leading to frustrated users and potentially lower engagement. (In the case of Wized, this also affects the pricing of the tool)

The Wized Loading Mechanism

Enter the Wized loading mechanism—it addresses the aforementioned challenge head-on. Developed with performance in mind, this mechanism aims to strike a delicate balance between functionality and speed, ensuring that users enjoy a seamless experience without sacrificing page views or loading times. (Or, as in the case of Wized, to not generate unnecessary "page views")

Key Features of the Wized Loading Mechanism

  1. Conditional Loading: The Wized loading mechanism employs a smart conditional loading strategy, ensuring that the Wized script is only loaded when necessary. By leveraging predefined conditions, such as specific page paths or user actions, the mechanism selectively loads the Wized script, minimizing unnecessary resource consumption.
  2. Path Whitelisting and Blacklisting: One of the standout features of the Wized loading mechanism is its ability to whitelist and blacklist specific page paths. This granular control allows developers to specify which pages should trigger the loading of the Wized script and which ones should be excluded. For example, course pages and lesson modules may warrant the inclusion of Wized functionality, while legal pages or unrelated content can be exempted.
  3. Optimized Performance: By judiciously loading the Wized script only when needed, the mechanism optimizes website performance, reducing overall page load times and enhancing the user experience. This optimization is particularly beneficial for websites with extensive content libraries or complex learning platforms, where resource management is paramount.

Implementation and Deployment

Implementing the Wized loading mechanism is a straightforward process that involves integrating the provided script into your website's codebase. By customizing the configuration variables, such as the WIZED_ID and path whitelist/blacklist, developers can tailor the mechanism to suit their specific requirements.

Sample Implementation:

<!-- [BMG] Advanced Wized loader -->
    window.WIZED_ID = 'YOUR_WIZED_ID';
    window.WIZED_LOAD_ON_HOMEPAGE = true;
    window.WIZED_LOAD_ON_STAGING = true;
    window.WIZED_PATH_WHITELIST = [''];
    window.WIZED_PATH_BLACKLIST = [];
<script src="https://cdn.jsdelivr.net/gh/BarthMedia/min-asset@main/wized/loader.js"></script>

Conclusion: Enhancing Performance Without Compromise

In conclusion, the Wized loading mechanism represents an approach to optimizing website performance while harnessing the power of third-party tools. By intelligently managing resource allocation and prioritizing user experience, this mechanism enables developers to strike the perfect balance between functionality and speed. (And, as in the case of Wized, to not generate unnecessary "page views")

So, whether you're building an e-learning platform, a content-rich website, or any online endeavor that relies on third-party scripts, consider integrating the Wized loading mechanism. Your users will thank you for it, and your website will thrive.

Embrace the future of web optimization with the Wized loading mechanism—a "page views" saving solution for a seamless online experience.

Share Article

Experience the BMG.studio Advantage

Ready to elevate your web projects to new heights? Partner with BMG.studio and unlock a world of possibilities. Our team of full-stack engineers....