I'm closing in on a release. Just need to fix a minor issue concerning editing the UA code and the version increment for packagist. Then it's a go. Keep you posted.

Version 0.2.0 is released, use:

composer require hyn/flarum-analytics

And visit your admin afterwards to enable and configure the extension.

A big thank you to @Toby for teaching me a bit more about debugging mithrill 😉

    luceos
    [InvalidArgumentException]
    Could not find package hyn/flarum-analytics at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability

      hfu that's odd, minimum stability of your root composer file should be beta, due to the beta state of flarum.

      Edit your composer file so that "minimum-stability" has the value "beta" and try again.

      Successful install-
      I use Piwik so I guess I can't use it yet, but this is a useful plugin!

      16 days later

      Installed but doesnt appear on Extensions List?

        Red that's very little to base any advice on. Can you elaborate? Does the directory exist under extensions?

        i used composer to install extension and its under vendor/hyn directory not in Extensions
        .

          Fixed, Thank you.

          15 days later

          I installed this plugin and it works. But somehow it seems only to fire a pageview at the load of the forum front page. When I click a post, it doesn't seem to fire a pageview. I'm not sure if this is because the plugin is built like that or I did something wrong.
          I know Flarum actually doesn't load a new page when navigating the forum since everything loads with ajax, but to use Analytics effectively, we need a faux pageview to be fired at the click of a post and at the click of a category. I guess this can be done easily by firing a pageview each time the URL changes.
          Thanks again for providing this extension. I hope you can use the feedback.

            Jahman that is something I never considered. I will look into it asap, thanks for pointing that out.

              Jahman we need a faux pageview to be fired at the click of a post and at the click of a category. I guess this can be done easily by firing a pageview each time the URL changes.

              The url actually also changes when scrolling. I think I can handle this by listenening to a m.redraw() event, not sure that's even possible though, will look into it.

              Jahman

              Version 0.2.1 released, might need to re-enable after updating with composer to dump caches. Tested locally with console.logging and does hit.

              Red weird composer acting strange again. Use dev-master otherwise. I'll fix it asap.

              Red Fixed it, forgot to remove version from the composer file.

              • Red likes this.