• Resolved talkiewalkie

    (@talkiewalkie)


    Hi,
    i need help.
    Since I installed your plugin on my site, google developer shows these errors:

    wpmGoogleInlineScripts.js:5 wpm is not defined. That means you are deferring the script which you shouldn't. wpm must be loaded before the inline scripts run. Visitor tracking will continue to work, but visitor cookie consent will be ignored.
    googleConfigConditionsMet @ wpmGoogleInlineScripts.js:5
    (anonymous) @ wpmGoogleInlineScripts.js:22
    
    wpmGoogleInlineScripts.js:5 wpm is not defined. That means you are deferring the script which you shouldn't. wpm must be loaded before the inline scripts run. Visitor tracking will continue to work, but visitor cookie consent will be ignored.
    googleConfigConditionsMet @ wpmGoogleInlineScripts.js:5
    (anonymous) @ wpmGoogleInlineScripts.js:23
    
    The resource https://***/wp-content/plugins/elementor/assets/lib/font-awesome/webfonts/fa-solid-900.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate <code>as</code> value and it is preloaded intentionally.
    
    The resource https://***/wp-content/plugins/elementor/assets/lib/font-awesome/webfonts/fa-brands-400.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate <code>as</code> value and it is preloaded intentionally.
    
    The resource https://fonts.gstatic.com/s/roboto/v20/KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate <code>as</code> value and it is preloaded intentionally.
    
    The resource https://fonts.gstatic.com/s/opensans/v18/mem8YaGs126MiZpBA-UFVZ0bf8pkAg.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate <code>as</code> value and it is preloaded intentionally.

    NB: I have inserted asterisks in place of the site name for privacy reasons.

    Can you help me?

    • This topic was modified 2 years, 9 months ago by talkiewalkie.
    • This topic was modified 2 years, 9 months ago by Jan Dembowski.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Georgi Ganchev

    (@georgiganchev)

    Hello @talkiewalkie

    It is likely that you are deferring the wpmGoogleInlineScripts.js script, which you shouldn’t, because with the new update it is required to be loaded before the inline scripts. You can exclude JS scripts from deferring from the plugin Frontend settings.

    The other warnings you see are due to the Fonts preload functionality. Since you have enabled that option intentionally there is nothing to worry about.

    If you do not want the fonts to be preloaded you can remove them from the list under SG Optimizer –> Frontend –> General –> Font preloading.

    You should experiment with the available options and see how they reflect on your website. If conflicts occur you can discuss them with your developer and consider which to turn on and off.

    Best regards,
    Georgi Ganchev

    Thread Starter talkiewalkie

    (@talkiewalkie)

    It is likely that you are deferring the wpmGoogleInlineScripts.js script, which you shouldn’t, because with the new update it is required to be loaded before the inline scripts. You can exclude JS scripts from deferring from the plugin Frontend settings.

    Can you please tell me how to do this? I’m really inexperienced and don’t know where to start….

    Thread Starter talkiewalkie

    (@talkiewalkie)

    You can exclude JS scripts from deferring from the plugin Frontend settings.

    I apologise in advance for the non-technical language! I will try to explain myself better: How exactly should I do this? And where can I find the script to exclude? I’m sorry but I really don’t know how to do this.

    Plugin Support Delyan Delov

    (@delyandelov)

    Hello @talkiewalkie,

    You can exclude the JS script from deferring from the
    Frontend section -> JAVASCRIPT tab -> Exclude from Deferral of Render-blocking JS

    If the script is not listed there, you can exclude the script manually by using the filter we’ve designed for that purpose:

    add_filter( 'sgo_js_async_exclude', 'js_async_exclude' );
    function js_async_exclude( $exclude_list ) {
        $exclude_list[] = 'script-handle';
        $exclude_list[] = 'script-handle-2';
    
        return $exclude_list;
    }

    If you are not sure how to use the above filter or how to find the script handle, you can always contact our technical support at SiteGround by creating a ticket and we will be glad to assist you.

    Best Regards,
    Delyan Delov

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Google Developer error after SG Optimizer installation’ is closed to new replies.