• 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 to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author braekling

    (@braekling)

    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 and 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

    (@seanking2919)

    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

    (@braekling)

    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

    (@seanking2919)

    – 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

    (@braekling)

    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.www.ads-software.com/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.