Forums » Help & Troubleshooting



Page Insights: Reduce the Impact of Third Party Code

Hello! I'm digging into performance and trying to speed my sites up. Page speed insights advising the below, anything we can do about it?

Reduce the impact of third-party code Third-party code blocked the main thread for 310 ms
Third-party code can significantly impact load performance. Limit the number of redundant third-party providers and try to load third-party code after your page has primarily finished loading. Learn more.
Third-Party
Transfer Size
Main-Thread Blocking Time
Roxr Software
7 KiB
307 ms
/js(static.getclicky.com)
6 KiB
307 ms

Posted Wed Mar 10 2021 7:04p by mjmurphy5***


The Clicky JavaScript is non-blocking as it loads asynchronously. When was the last time you updated your tracking code? The current version should be something like this:

var clicky_site_ids = clicky_site_ids || []; clicky_site_ids.push(*************);


See how the second line says script async. If the spam filter clears the code above, just go to Preferences > Tracking Code and copy/paste it from there.

Posted Thu Mar 11 2021 1:49a by drkskwl***


Thanks for the reply - I actually use the clicky plugin, so maybe I need to take a look there? Initial setup was years ago, but I keep the plugin updated of course.

Maybe I should just use the code itself and ditch the plugin?

Posted Thu Mar 11 2021 5:51a by mjmurphy5***


I looked now that I'm at my desk and had some coffee - the plugin doesn't show what it's using, it's just a site id and site key input.

Anyway to know if the plugin is loading the right script?

Posted Thu Mar 11 2021 6:44a by mjmurphy5***


Looking at clicky analytics changelog, the only thing I can find is this:

1.6
Enhancements:
major tracking code upgrade, uses the latest Clicky tracking code (with navigator.sendBeacon)

Posted Thu Mar 11 2021 12:17p by mjmurphy5***


From what I recall, page insights will also ding you for having Google Analytics code on it. At least it's fair, but the point is if they're penalizing even their own product, the warning is more scary than the reality.

Really you only need to worry about if you have say 5 or more third party codes on your site. News web sites are notorious for having like 30-50 third party codes on their pages. That kind of thing is insanity and makes web sites slow. But having just a tracker or two on your site? Nothing to worry about.

Posted Thu Mar 11 2021 12:23p by Your Friendly Clicky Admin


I understand your point but I'd still like to figure out a plan to address this because my mobile page score is way low and this was specifically something flagged as a "major impact" as noted above.

Any way to know 1. if I'm loading the asynchronous way via the plugin or if I should switch and install the script directly myself, and 2. anything we can do to improve this? Getting rid of clicky is not an option, as I have relied on it for years and love the product.

Posted Thu Mar 11 2021 12:39p by mjmurphy5***


Not sure what the plugin does currently but you have a bunch of sites in your account, give one site ID that you want me to look at and I'll see what the code looks like in your HTML.

Posted Thu Mar 11 2021 3:29p by Your Friendly Clicky Admin


Oops that did not copy well. You can see the id above though - and can you please edit to remove that after you have checked it?

Posted Thu Mar 11 2021 3:35p by mjmurphy5***


Yes that's the async code. Everything is set up as optimal as possible.

Posted Thu Mar 11 2021 4:22p by Your Friendly Clicky Admin


Existing tracking code via async still has PSI impact, it's pulling a 3rd party request that will show up on Page Insights


I defer getclicky.js on user interaction, will take your issues away

Posted Sun Mar 14 2021 10:21a by diningdaten***


You must be logged in to your account to post!