Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Custom HTML issue: Old snippets seamingly not being removed

  • #7908
    Avatar photo[anonymous]

    I had a custom html snippet for plausible.io in the head section, but then replaced it by a custom one. Yet both are in the head section, plausible.io and tchncs.de. How to remove the obsolete one?

    #7918
    Avatar photo[anonymous]

    Hi,

    Are you sure that you have no custom changes in your theme or plausible plugin installed? If you saved your settings, Publii should inject only the updated HTML head code.

    #7930
    Avatar photo[anonymous]

    Yes, I just switched hosting from plausible.io to tchncs.de and made sure there is no custom html elsewhere. Also, I tried blanking the head section of custom html in the gui and saving, but the old Plausible snippet remains in the head section of the website (I checked with developer tools).

    #7937
    Avatar photo[anonymous]

    @Gyges – are you sure that you have properly synced your website after this change? I have tried to reproduce such issue and always when I make the HTML code for head section empty my custom code disappears.

    And additionally as I mentioned – are you sure that you are not using plausible plugin? It also injects code to the head section.

    #7943
    Avatar photo[anonymous]

    Alright, now I`m getting you…

    Yes, I have the Plausible Plugin installed… but since it`s self-hostable, I did not presume it hard-injecting the plausible.io url into the head section. Does that mean that the Plausible Plugin is not meant for self-hosting at this stage?

    #7945
    Avatar photo[anonymous]

    If so, I would recommend adding a second field to the plugin for the src entry for self-hosting:

    <script defer data-domain=”s3nnet.de” src=”https://stats.tchncs.de/js/plausible.js”>or </script>

    #7947
    Avatar photo[anonymous]

    @Gyges – you’re right – we forgot about add support for self-hosted version of Plausible analytics 🙂 I will prepare new updated version of the plugin in 1-2 days.

    #7948
    Avatar photo[anonymous]

    Thats great, thank you very much!

    #7950
    Avatar photo[anonymous]

    @Gyges – updated version of the plugin which allows users to set URL for the plausible.js script is available: https://marketplace.getpublii.com/plugins/plausible-analytics/

    #7953
    Avatar photo[anonymous]

    Great work! I deployed it an can confirm it works! Now only the given URL is in the head section.

    #7990
    Avatar photo[anonymous]

    Btw, this seemed quite news-worty, so I made a Publii News Quickie about it (German):

    https://www.s3nnet.de/publii-news-quickie-aktualisierte-version-des-plausible-plugins-verfuegbar/

    #7991
    Avatar photo[anonymous]
    #7992
    Avatar photo[anonymous]

    @Gyges thanks ❤️