Hello @koalarry,
Unfortunately, Slimstat Analytics plugin is not working on the maintenance mode pages because WP Maintenance Mode is using different hooks than the ones from a WordPress theme.
It would be necessary to develop a bridge between these two plugins, but we do not provide this kind of services.
—
George
-
This reply was modified 6 years, 8 months ago by
George J.
-
This reply was modified 6 years, 8 months ago by
George J.
As a matter of fact, you can try to add the Slimstat code (from Slimstat > Settings > Tracker > External Pages) to the maintenance mode page (before </body>).
There are two ways to do that:
1. use wpmm_footer action
2. edit the maintenance mode page – here’s a small tutorial: https://wordpress.org/support/topic/how-to-delete-meta-tags-produced-by-this-plugin/#post-11779274
If you don’t have experience with WordPress hooks, you should choose the second way.
@georgejipa
I was about to post a suggestion about using the “External Pages” feature to do what @koalarry is asking 🙂
I will look into adding the appropriate hooks to track the maintenance page to Slimstat.
Best,
Jason
@coolmann awesome! let me know if you need help.
@georgejipa I will reach out if there’s anything I might need help with regarding your plugin! Excellent plugin, btw!
Thanks,
Jason
Hi @georgejipa
I was looking at your source code to see if there was any action I could hook into to append the tracker to the maintenance mode page. However, all I can find is
$scripts = apply_filters('wpmm_scripts', $scripts);
Our tracking code also requires to add specific parameters via wp_localize_script. However, your maintenance.php template just uses the script URL. Is there any way you could add an action or something that we could hook into to display the localized params?
Thanks,
Jason
@coolmann you can use wpmm_scripts filter to add the javascript file and wpmm_before_scripts action to add the parameters
https://github.com/Designmodocom/WP-Maintenance-Mode/blob/master/views/maintenance.php#L191
Terrific! We’ll add those hooks to our code in our next update!
Thank you for getting back to me so quickly.
Jason
You’re welcome! And thank you, too.