google codes - Forum | JoomShaper
Solved SP Page Builder

google codes

Asked by Pascal 5 years ago Last activity 5 years ago

I have a multi language site with 4 languages.
Each have 2 templates (pages + blogs)

In each template custom code I pasted google site tag in 'Before </body>'

While checking pagespeed I have issues with these scripts:

  • 'Remove unused JavaScript to reduce bytes consumed by network activity.'
  • 'Remove dead rules from stylesheets and defer the loading of CSS not used for above-the-fold content to reduce unnecessary bytes consumed by network activity. '

Issues about www.googletagmanager.com and www.gstatic.com and also recaptcha.

I there better / another way to add these scripts to my multilanguage site to solve the speed issues?

Thanks and regards,
Pascal

Accepted answer

Marked as the solution
Paul Frankowski Senior Staff

This is trusted method used by Joomla webmasters since 2015 at least.

Of course there are more similar modules. It was one of them.

8 more replies

Paul Frankowski Senior Staff

Hi,
As I remember on Joomla Extension Directory (JED) there are plugin(s) that works faster than default Google code. You have to search.

Anyway you can also search for tips used in WordPress - their community is XX langer, more blogs, tutorials - basic speed rules are similar. Maybe there is better way than just copy-paste ready code.

Pascal Asked this

Thanks, I'd rather not add more extentions.
Just like to know what options I have in pagebuilder/helix to add the code in multilanguage site.
Is it possible to add codes any other way... to index.php after pageload?

Regards,
Pascal

Paul Frankowski Senior Staff

Of course You can customize template code, but as you know, it's at your risk and responsibility.

Pascal Asked this

Thanks Paul,
Was hoping you could explain another approach to load scripts after pageload to tackle this issue.
If something pops up feel free to share this ;)

Regards,
Pas

Paul Frankowski Senior Staff

I use plugin or module. But you said that you don't want to install any. So you should admit that we have a very limited choice.

What is ironic... google want to load his scripts on the top of website, then he "cries" that it slown down the website. Madness, don't you think.

Pascal Asked this

Indeed Madness. What plugin works nicely with pagebuilder (in combination with JCH)?
Maybe I could give it a try and make google happy ;)

Paul Frankowski Senior Staff

HDAnyCode module - that you can publish in any module position or inside SPPB Page using Module addon.

Pascal Asked this

Thanks! will check if this helpes to reduce the madness.

Log in to reply.