Craig Posted May 20, 2020 Share Posted May 20, 2020 I've been using Fathom Analytics for a while now and on a growing number of sites, so thought it was about time there was a PW module for it. WayFathomAnalytics WayFathomAnalytics is a group of modules which will allow you to view your Fathom Analytics dashboard in the PW admin panel and (optionally) automatically add and configure the tracking code on front-end pages. Links GitHub Readme & documentation Download Zip Modules directory Module settings screenshot What is Fathom Analytics? Fathom Analytics is a simple, privacy-focused website analytics tool for bloggers and businesses. Stop scrolling through pages of reports and collecting gobs of personal data about your visitors, both of which you probably don't need. Fathom is a simple and private website analytics platform that lets you focus on what's important: your business. Privacy focused Fast-loading dashboards, all data is on a single screen Easy to get what you need, no training required Unlimited email reports Private or public dashboard sharing Cookie notices not required (it doesn't use cookies or collect personal data) Displays: top content, top referrers, top goals and more 13 2 Link to comment Share on other sites More sharing options...
Klenkes Posted May 23, 2020 Share Posted May 23, 2020 I am a huge Fathom fan myself and I was happy when I read that a module exists. But I hate it when I am the first to complain... After the the module install I get the following screen: I am unable to configure the module ? What can I do? PW 3.0.123 | PHP 7.3.18 1 Link to comment Share on other sites More sharing options...
Klenkes Posted May 23, 2020 Share Posted May 23, 2020 Tracy says: Link to comment Share on other sites More sharing options...
Craig Posted May 23, 2020 Author Share Posted May 23, 2020 Thanks for checking it out & reporting the error details Klenkes! Not sure why that is yet but I'll try and re-create and fix. Bear with me :) Link to comment Share on other sites More sharing options...
Craig Posted May 23, 2020 Author Share Posted May 23, 2020 Hi @Klenkes - it's because the modue is using InputfieldToggle, which only arrived in PW 3.0.139 - sorry! Feel free to update your site to .139 or later if you're able or want to, but I'll update the code to use checkboxes when the toggle input isn't available. 1 Link to comment Share on other sites More sharing options...
Klenkes Posted May 23, 2020 Share Posted May 23, 2020 Yep! That's it! Thanks. Or you should add this to the system requirements. Link to comment Share on other sites More sharing options...
Craig Posted May 23, 2020 Author Share Posted May 23, 2020 No problem! I'll try to work around the lack of Toggle inputfield (rather than make it required), just so it's usable on more versions of PW :) 2 Link to comment Share on other sites More sharing options...
Craig Posted May 23, 2020 Author Share Posted May 23, 2020 @Klenkes I've updated the module to version 0.0.2 now which uses InputfieldRadios when InputfieldToggle isn't available. Please give it a go and let me know if that's solved it for you! 2 Link to comment Share on other sites More sharing options...
Klenkes Posted May 24, 2020 Share Posted May 24, 2020 Tested 0.0.2 on 2 sites with ProcessWire < 3.0.139(no toggle) and it works like a charm! 1 Link to comment Share on other sites More sharing options...
Craig Posted May 24, 2020 Author Share Posted May 24, 2020 Thanks, that's brilliant! :) Link to comment Share on other sites More sharing options...
Marcel_M Posted June 22, 2021 Share Posted June 22, 2021 Hi all, I was installing the module and this message apperared: Quote Deprecated: Non-static method ProcessWire\WayFathomAnalytics::getEmbedConfig() should not be called statically in /var/www/processwire/site/modules/WayFathomAnalytics/WayFathomAnalytics.module.php on line 76 PW: 3.0.165 Is this bad? I am not that of a pro in php and I don't want to mess things up. Best, Marcel Link to comment Share on other sites More sharing options...
Craig Posted June 22, 2021 Author Share Posted June 22, 2021 Hi Marcel! I think this is a small mistake in the module code. I'll release an update soon, but for now, you can change it manually as follows: In WayFathomAnalytics.module.php, at line 150, change it to this: private static function getEmbedConfig(array $data) (add the word 'static' after private). 1 Link to comment Share on other sites More sharing options...
Klenkes Posted August 31, 2021 Share Posted August 31, 2021 @Craig The dashboard doesn't work anymore ? I think due to security changes in browsers they refuse to show the Iframe, at least Chrome and Firefox. This is what shows in the console: Refused to display 'https://app.usefathom.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'. (index):7374 crbug/1173575, non-JS module files deprecated. (anonymous) @ (index):7374 DevTools failed to load source map: Could not load content for https://www.xxxxxxx.de/site/modules/WayFathomAnalytics/iframeResizer.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE iframeResizer.min.js:8 [iFrameSizer][Host page: fathom-stats-iframe] IFrame has not responded within 5 seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning. Link to comment Share on other sites More sharing options...
Craig Posted August 31, 2021 Author Share Posted August 31, 2021 Hi @Klenkes, thanks for letting me know! I'll have a look. 1 Link to comment Share on other sites More sharing options...
Klenkes Posted September 1, 2021 Share Posted September 1, 2021 mhh... it works again... Something Fathom did? Link to comment Share on other sites More sharing options...
Klenkes Posted July 29, 2022 Share Posted July 29, 2022 @CraigHave you noticed recently that Fathom inserts a warning banner if Fathom is embedded via your module? And the iframe is cut off at the bottom. Screenshot: I couldn't figure out what to do. Link to comment Share on other sites More sharing options...
Klenkes Posted July 30, 2022 Share Posted July 30, 2022 The warning banner seems to be gone now. The cut off iframe results from iframeSizer.contentWindow.min.js not being loaded by Fathom. I hope they are aware and working on it. Link to comment Share on other sites More sharing options...
Klenkes Posted May 2 Share Posted May 2 Hi @Craig On PHP 8.1 and 8.2 the module throws a fatal error (at least with 3 different hosters) after install: In short: Fatal Error: Uncaught Error: Non-static method WayFathomAnalytics::getEmbedConfig() cannot be called statically in /site/modules/WayFathomAnalytics/WayFathomAnalytics.module.php:76 EDIT: removing static from the function seems to work (line 61 in WayFathomAnalytics.module.php) But I don't know enough about PHP functions ... Link to comment Share on other sites More sharing options...
Craig Posted May 2 Author Share Posted May 2 Hi @Klenkes, sorry for the issue. I've just published a new version which should fix it. Please give that a go and let me know if it's worked. 2 Link to comment Share on other sites More sharing options...
Klenkes Posted May 3 Share Posted May 3 Hi @CraigThank you very much! Seems to work fine now. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now