• Resolved roaima

    (@roaima)


    I have a network installation. The primary is an inaccessible host, let’s call it wordpress.roaima.co.uk, and it’s here that I’ve installed the Burst plugin. This makes it available to the network of sites, which includes my specific website harrogateitconsulting.uk. (This is normal and required behaviour for a network installation. I cannot install plugins to individual network sites.)

    While trying to identify why Burst isn’t seeing any page hits I fired up a Developer Console in one of my web browsers. The home webpage for harrogateitconsulting.uk loads as expected, but then I see a POST attempt to wordpress.roaima.co.uk/wp-content/plugins/burst-statistics/endpoint.php. This site is inaccessible off my LAN and quite reasonably the POST fails.

    Here’s what’s included in a page for harrogateitconsulting.uk. You’ll see there’s reference to the (externally) invalid wordpress.roaima.co.uk:

    <script type="text/javascript" id="burst-js-extra">//<![CDATA[ var burst={"url":"https:\/\/wordpress.roaima.co.uk\/wp-json\/","page_id":"14","cookie_retention_days":"30","beacon_url":"https:\/\/wordpress.roaima.co.uk\/wp-content\/plugins\/burst-statistics\/endpoint.php","options":{"beacon_enabled":1,"enable_cookieless_tracking":1,"enable_turbo_mode":0,"do_not_track":0},"goals":[],"goals_script_url":"https:\/\/www.harrogateitconsulting.uk\/wp-content\/plugins\/burst-statistics\/\/assets\/js\/build\/burst-goals.js?v=1.5.5.1"}; //]]></script>

    Burst should be posting to harrogateitconsulting.uk/wp-content/plugins/burst-statistics/endpoint.php but somehow it’s picking up the wrong hostname.

    • This topic was modified 2 years, 4 months ago by roaima.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter roaima

    (@roaima)

    More discovery. It’s two specific clauses in burst-statistics/functions.php that return the network hostname if it’s a network installation.

    Commenting these out makes the code work here.

    Why have it at all?

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    @roaima I take it you are referring to burst_get_beacon_url()?

    It is designed to return the main site url if the plugin is network wide activated. The user can then measure statistics from the main site dashboard, across all subsites.

    If not activated networkwide, but per site, statistics are measure per site. It sounds like in your case, activating per site should resolve the issue.

    Would that work for you?

    Thread Starter roaima

    (@roaima)

    Yes, treating each site separately would be perfect. (Is that an option I missed during installation?)

    Thanks!

    • This reply was modified 2 years, 4 months ago by roaima.
    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    @roaima can you check if this version works for you?
    https://github.com/Burst-Statistics/burst/tree/per-site-endpoint

    In one of the coming releases there will be an option to track all subsites on the main site only (useful for sites where all subsites are a language directory for example). The default will be per site.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Burst posts to endpoint.php on the wrong host’ is closed to new replies.