Loading speed - footer code or plug-in?

I wonder if anyone can advise please?

In terms of page loading speed which is faster - the Matamo WP plug-in or manually introducing the Javascript code in the footer? I am currently using the latter to keep the plug-in count down.

Many thanks!

Hi,

The WP-Matomo plugin simply adds the JS code in the footer. So if you don’t need any of its features, you can simply use the JS code in your template.

Brilliant! Thank you so much for responding so quickly!

1 Like

I got my answer thanks!

I added the code to the header with an add_action(‘wp_head’ operation but I see from cache files that identically the same code is also in the footer, and the settings say it is in the footer.

Does this mean (a) that it may be counting visits twice, and (b) should I delete the wp_head script?

Being too used to Google (GA4 sucks) I expected to have to add the code myself but perhaps you should make this a little clearer and not display the code unless the user wants to add it manually, when the settings drop down should include a DIY option.

Much impressed though except the palaver of inheriting GA4 stuff was too much - Google has already changed things or my account is different so your video is out of date!

Hello @Loggy

The wordpress plugin already add the required javascript in your page, even in the manual tracker option. Please don’t add it a second time.
It’s mentioned that you don’t have anything do to and the tracker is enabled. Maybe we should review the wording, right.
And could you give me the video URL for the one you would like to be updated?
Kind regards

Mat

… or add a Manual facility in the settings in case someone wants to modify your scripts …

Thanks anyway - I will remove the wp_head addition!

Thanks for your answer I was also looking for the same question and was going to add a new topic.

Thanks a lot for clearing up the confusion. :+1: