Page Load Time
    • 1 Minute to read
    • Dark
      Light

    Page Load Time

    • Dark
      Light

    Article summary

    The Page Load Time plugin lets you track the loading time of a single page and integrate the reported values into Mapp Intelligence. Learn more about it here.

    Where does the information come from?

    The browser automatically informs the plugin when the 'onload' event is fired. It waits until the page is completely loaded (browser event 'onload' or browser property 'document.readyState === complete').

    Once the parameters have been activated, these must be configured for tracking. This is done via the Mapp Q3 tool under Configuration > Custom Parameters > Event Parameters. Create a new parameter here and select one of the predefined configurations for measuring loading times.

    A predefined ID is assigned to each parameter:

    • Event parameter 920: loading time in milliseconds

    Methods and properties

    name

    Get the name of the extension.

    /**
     * @type {string}
     */
    wtSmart.extension.page_load_time.name;

    version

    Get the version of the extension.

    /**
     * @type {string}
     */
    wtSmart.extension.page_load_time.version;

    isActivated

    Get the status, if the extension is enabled.

    /**
     * @returns {boolean}
     */
    wtSmart.extension.page_load_time.isActivated();

    activate

    Activate the extension.

    wtSmart.extension.page_load_time.activate();

    deactivate

    Deactivate the extension.

    wtSmart.extension.page_load_time.deactivate();

    Example

    // is page load time activated
    var isActivated = wtSmart.extension.page_load_time.isActivated();
    
    // activate page load time
    wtSmart.extension.page_load_time.activate();
    
    // deactivate page load time
    wtSmart.extension.page_load_time.deactivate();

    Code Generator

    Use the code generator to create individual code that you can then integrate directly into the website.


    Was this article helpful?