Jump to content

Recommended Posts

Posted

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

What is Fathom Analytics?

Fathom Analytics is a simple, privacy-focused website analytics tool for bloggers and businesses.

fathom-analytics.png?dl=0&raw=1

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
  • Like 13
  • Thanks 2
Posted

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:

after-install-1.png.b67af1b33bda37d2ffdc41a8bc12e14f.png

after-install.png.f8e1495329887ba8077451feb630efe5.png

I am unable to configure the module ?
What can I do?

PW 3.0.123 | PHP 7.3.18

  • Like 1
Posted

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 :) 

Posted

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.

  • Like 1
Posted

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 :) 

  • Like 2
Posted

@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!

  • Like 2
  • 1 year later...
Posted

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

Posted

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).

  • Like 1
  • 2 months later...
Posted

@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.

 

  • 10 months later...
Posted

@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:

fathom-warning.thumb.PNG.78d663aeb8290fc1ea21dc8d51ee84b6.PNG

I couldn't figure out what to do.

Posted

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.

  • 1 year later...
Posted

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 

module-error.png

EDIT:
removing static from the function seems to work (line 61 in WayFathomAnalytics.module.php)
But I don't know enough about PHP functions ...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...