• Resolved aglyons

    (@aglyons)


    I have some scripts added to the config for all pages in the header and footer code areas.

    For some landing pages, I want to exclude some scripts so I added the standard tracking scripts to the landing page header code and selected the replace the site-wide code option.

    It’s not totally clear but does that option only apply to the header code section? I have some scripts in the site-wide footer code section and those scripts are still being loaded when they shouldn’t be. On the linked page the Frase chatbot should not be loading. That script that loads that is in the site-wide footer code section. This landing page’s footer code section is blank.

    Yes, I have cleared all server and client-side cache.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter aglyons

    (@aglyons)

    So I have discovered that even though that switch is in place, the other sections’ code blocks will retain the global settings unless you add something in those blocks. Leaving them blank does not mean that the per-page setting will remove the global code.

    I had to add <script></script> in order to disable the global content and replace it with the per-page content.

    Is this by design?

    Plugin Contributor TechWebUX

    (@techwebux)

    Hello @aglyons,

    Thank you for choosing Head & Footer Code for your project, and please excuse me for late response.

    Yes, you are right – the ‘replace’ behavior for the articles specific code work as you mentioned.

    Just instead of empty script, you can use empty space character (which will be trimmed so no additional code will be added to HTML code anyway, or use empty HTML comment <!-- --> if you prefer to see where article specific code is inserted.

    Please let me know if you have any other questions?

    Kind regards,
    Aleksandar

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Replace Site-Wide Code function not working’ is closed to new replies.