• Extensions
  • FriendsOfFlarum Analytics - tracking user visits

luceos Remind me please, do we use Cloudfare for any of this? I don't recall signing up for it or seeing it.

Let me know how to please and I will do it. Google search results all instruct to log in but I don't think I have Cloudfare account.

Well, I have an update. Without doing anything further to Cloudfare (what is it @luceos anyway?) or anything else, the extension title now shows properly!

This resolved itself with time.
Would have love to "force" the refresh but I never found a way.

Glad it did.

    I still don't see how Cloudflare comes into consideration @luceos

    But I am using Opera in macOS and to relad a page without cache:

     option + command + R 

    does the trick. It may be the same in Safari and Chrome. clearing the Flarum cache on the server does not solve this.

    I just installed an extension that shows users and I was having the same text formatting issue before using those keys combo.

    Thank you very much each one of you for all of your help!

      bikepost cloudflare is a saas you can also have, some hosting providers ship your website with it per default. Cloudflare does some DDOS protection but also caches your pages, something Flarum does not always like that much I think mostly because it doesn't flush the manifest file.

      @luceos I understand but I don't think my host uses Cloudflare. How do I check?

      2 months later

      For me Piwik integration did not work with this extension. _paq.push(['setSiteId', '1']); gets included with ##piwik_options## and not at its appropriate place after _paq.push(['setTrackerUrl', u+'piwik.php']);, so nothing got tracked.
      I don’t know if this was also responsible for the iframe only giving a 500 error in the Flarum admin interface, but possibly?

      I have now manually included the correct tracking code in core/views/app.blade.php and tracking works.
      But it only tracks initial visits and when you refresh a page. So not pages visited via the forum navigation (until refreshed). Is there a setting to change this behaviour or is it just due to how Flarum is built?

      3 months later

      Do you think you could add an option to set the username ie

      _paq.push(['setUserId', '<?=$user['username']?>')

      That's from my site not Flarum

      Thanks,
      Larry

        jenolan where would that $user variable come from ?

        Registering the Flarum username, email or id as the Piwik user id with this extension would make sense though.

        The username is what it wants, non-logged in you just do not set it. Of course the email (etc) an option setting?

        Just released version 0.6.0 !

        Update with the following command (or use Bazaar):

        composer require flagrow/flarum-ext-analytics
        php flarum cache:clear

        This extension didn't receive much love during this year... It was about time:

        • Fixed Piwik not tracking page url change correctly
        • Added the option to track users by username or email in Piwik, following jenolan suggestion. It's disabled by default
        • Added the option to specify a protocol with the Piwik domain, so you can force https:// analytics for non-https forum for example. Defaults to // as before if not specified
        • Updated the settings UI to use Flarum components instead of non-styled HTML inputs
        • Fixed a potential XSS vulnerability if you enabled the "Track subdomains" option
        • Cleaned up the code

        Edit: replaced composer update flagrow/flarum-ext-analytics which does not work to update to that new version ?

          clarkwinkelmann Heya Thanks! Will install and give it a whirl!

          Just tried to upgrade doesn't load via composer

            jenolan Just tried to upgrade doesn't load via composer

            This might happen when your composer holds the version to 0.5. Try using composer require flagrow/flarum-ext-analytics instead.

              luceos Yup you are right, that's a funny behaviour for composer ;-)

              3 months later