Title: Matomo code not showing in the source code
Last modified: December 13, 2018

---

# Matomo code not showing in the source code

 *  [seanking2919](https://wordpress.org/support/users/seanking2919/)
 * (@seanking2919)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/matomo-code-not-showing-in-the-source-code/)
 * Hi,
 * So, I’m trying to set up Matomo for a WordPress Multisite installation and I 
   manually entered the code. However, the code never appeared in the footer or 
   in the header for that matter.
 * How do I fix this?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fmatomo-code-not-showing-in-the-source-code%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/matomo-code-not-showing-in-the-source-code/#post-10987573)
 * I had a short look at your source code… there seems to be something wrong with
   your theme. E.g., stylesheet references show up in the documents body, but they
   should appear in the `<head>` section.
 * Please check if [wp_header](https://codex.wordpress.org/Function_Reference/wp_head)
   and [wp_footer](https://codex.wordpress.org/Function_Reference/wp_footer) are
   used in your plugin and are placed at the correct position (see the documentation
   links).
 * Additionally, the source code shows you are using a cache plugin. Did you make
   sure the source code was refreshed after enabling WP-Matomo? Maybe you can clear
   the plugin’s cache or disable and re-enable it once.
 *  Thread Starter [seanking2919](https://wordpress.org/support/users/seanking2919/)
 * (@seanking2919)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/matomo-code-not-showing-in-the-source-code/#post-10990979)
 * Ok. So, I tried clearing the plugin’s cache and disabling and re-enabling it 
   once. Neither worked. How would I know if wp_header and wp_footer are used in
   the plugin or not?
 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/matomo-code-not-showing-in-the-source-code/#post-10996791)
 * I need some more precise information to be able to help you.
 * – Which plugin’s cache did you clear? Which plugin did you de- and reactivate?
   Your caching plugin (as I suggested) or WP-Matomo? You should disable/ clear 
   your cache plugin, reload and check before you enable the plugin again.
 * – Did you check your blog’s HTML structure? It’s still messed up, e.g., containing
   stylesheet references inside the `<body>` part. Something seems to be wrong with
   loading js/css in general.
 * – You have to check wp_footer and wp_head inside your theme’s (not plugin’s!)
   files. Check the WordPress documentation I referred to. There is mentioned were
   the method calls typicall appear (`wp_head` in header.php or index.php; `wp_footer`
   in footer.php or index.php – but this may differ in your theme). The wp_head 
   call should be inside the `<head>` section, the wp_footer call before the closing`
   </body>` tag.
 *  Thread Starter [seanking2919](https://wordpress.org/support/users/seanking2919/)
 * (@seanking2919)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/matomo-code-not-showing-in-the-source-code/#post-11024783)
 * – I initially cleared WP-Matomo’s cache. But I did just cleared the cache of 
   W3 Total Cache. Then I deactivated and then reactivated W3 Total Cache.
    – Not
   sure how to fix it honestly. Wondering if it’s something I should consult with
   W3 Total Cache about. – wp_head is in the <head> section of the header.php in
   my theme and wp_footer is before the </body> in footer.php in my theme.
 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/matomo-code-not-showing-in-the-source-code/#post-11042445)
 * I don’t think the issues with your HTML are related to W3 Total Cache. I guess
   your theme is messed up somehow.
 * If wp_head and wp_footer are called, WP-Matomo is configured (= connected with
   Matomo) and tracking is enabled, the tracking code should appear.
    Did you try
   to enable WordPress’ debug mode? ([https://codex.wordpress.org/Debugging_in_WordPress](https://codex.wordpress.org/Debugging_in_WordPress))
   Maybe this will show an error message related to WP-Matomo which will help to
   understand why the tracking code does not appear anyway.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Matomo code not showing in the source code’ is closed to new replies.

 * ![](https://ps.w.org/wp-piwik/assets/icon-256x256.png?rev=3529668)
 * [Connect Matomo - Analytics Dashboard for WordPress](https://wordpress.org/plugins/wp-piwik/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-piwik/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-piwik/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-piwik/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-piwik/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-piwik/reviews/)

## Tags

 * [multisite](https://wordpress.org/support/topic-tag/multisite/)

 * 5 replies
 * 2 participants
 * Last reply from: [braekling](https://wordpress.org/support/users/braekling/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/matomo-code-not-showing-in-the-source-code/#post-11042445)
 * Status: not resolved