• Resolved Guillaume G.

    (@g4ll4is)


    Hi,

    I found an incompatibility between Plausible Plugin and Email Encoder Pro (by @tillkruess). Under some circumstances the Plausible tracking script fails to load and no stats are sent to Plausible.io.

    Step to reproduce :

    1. Install both Email Encoder Pro and Plausible Plugin
    2. Add at last two categories (or to tags) to a Post
    3. In Email Encoder Pro settings, set Full-page scanner
    4. Check the source code of the Post

    Expected source code :

    <script defer 
    data-domain='domain.tld'
    data-api='https://domaine.tld/wp-json/f3c831/v1/19cb/7557d478'
    data-cfasync='false'
    event-author='author'
    event-category='CategoryOne'
    event-category='CategoryTwo'
    src="https://plausible.local/wp-content/uploads/3f0810ba81/1929006b.js?ver=1726748204" id="plausible">

    Actual output :

    <script defer 
    data-domain='domain.tld'
    data-api='https://domaine.tld/wp-json/f3c831/v1/19cb/7557d478'
    data-cfasync='false'
    event-author='author'
    event-category='CategoryOne'>

    Every attribute after the first event-category are missing, including the src that loads the script.

    The issue only appears when the Post has at least two categories or two tags.

    Example output when using only one category, but two tags :

    <script defer 
    data-domain='domain.tld'
    data-api='https://domaine.tld/wp-json/f3c831/v1/19cb/7557d478'
    data-cfasync='false'
    event-author='author'
    event-category='Uncategorized'
    event-post_tag='TagOne'>

    Every attribute past event-post_tag is dropped.

    The issue started in July after updating Plausible 2.0.9 to 2.1. It made my Plausible stats drop to zero, despite server logs showing activity.

    I’ve tested the issue on a new, blank, empty WordPress 6.6.2 with only the latest Plausible (2.1.3) and the latest Email Encoder Pro (0.3.11) activated. The issue remains.

    My website was under WordPress 6.2.6 with Email Encoder Pro 0.3.10 and Plausible 2.1 when the problem started.

    I can’t just deactivate one of the plugins, as I need Plausible to track usage, and Email Encoder Pro to protect mailto: mails from being harvested my spammers.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor DaanvandenBergh

    (@daanvandenbergh)

    @tillkruess, I don’t have a copy of your premium plugin, ofcourse, but since the option mentions full page scanning, I’m going off the bat and assume that you’re using a DOMDocument derivative, like a PHP HTML5 parser? The duplicate attributes fail validation and get removed. Correct?

    Till Krüss

    (@tillkruess)

    @daanvandenbergh Duplicate attributes shouldn’t get removed, but I can send you a license key. What’s your email?

    Plugin Contributor DaanvandenBergh

    (@daanvandenbergh)

    that’s excellent, man!

    you can send it to me using this form: https://daan.dev/contact

    Plugin Contributor DaanvandenBergh

    (@daanvandenbergh)

    I’ve been able to reproduce the issue on my local machine. Investigating a possible fix now.

    Plugin Contributor DaanvandenBergh

    (@daanvandenbergh)

    Hi @tillkruess,

    The issue seems to occur in the EAE_DOM_Encoder class on line 82: $this->dom->root->innertext().

    Somewhere before that (I assume in the loop() function) the duplicate attribute is removed.

    Do you think you can do something about this? If not, please let me know and I’ll have to discuss internally if we should/can change the way these attributes are handled on our side.

    Thread Starter Guillaume G.

    (@g4ll4is)

    Hi @tillkruess, any update on this?

    Do you plan to handle the issue on your side (Email Encoder Pro)?

    If neither you nor Plausible can deal with this plugin incompatibility, I’d prefer to know.

    Plugin Author Marko Saric

    (@plausible)

    @g4ll4is as Daan explained this would be better changed in Email Encoder Pro directly as for us this would mean a bigger change that would impact several things about how our product works currently. so from our perspective, we don’t plan to make any changes at this moment. sorry for the trouble!

    Thread Starter Guillaume G.

    (@g4ll4is)

    Thanks for making your position explicit. I understand your point and do agree it would be better if Email Encoder Pro ( @tillkruess ) dealt with this.

    Meanwhile I’ve ordered a custom dev to solve this issue on my end. I will try to get something that I can publish here when it’s done, so the workaround can be useful to others. But no guarantee.

    • This reply was modified 3 weeks ago by Guillaume G..
    • This reply was modified 3 weeks ago by Guillaume G.. Reason: working link to till krüss profile
Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.