Skip to content

yireoGoogleTagManager2Pusher #290

@rbrown

Description

@rbrown

Hi, sorry this is really an issue for the hyva module but it's issues are turned off, and I'm not 100% sure what the correct fix is.

This change yireo/Yireo_GoogleTagManager2HyvaCheckout@9efe9f6 added html escaping to the output of json_encode, but I do not think you need to escape json_output within a <script> block

With the patch this template produces code that looks like this

<script nonce="MGt2Mzh0dTd6bjY2OWZ3Z2FlODZ0c3J2eW51eGZqcjE=">
        window.addEventListener('ga:trigger-event', function (event) {
            yireoGoogleTagManager2Pusher(event.detail, 'Hyva Checkout');
        });

        (function () {
            yireoGoogleTagManager2Pusher({&quot;event&quot;:&quot;begin_checkout&quot;,

when I think it should be doing this:

<script nonce="YTdyaDZyMzBreTV2dG1pNGc5bWsycXlreDlva2tuZnU=">
        window.addEventListener('ga:trigger-event', function (event) {
            yireoGoogleTagManager2Pusher(event.detail, 'Hyva Checkout');
        });

        (function () {
            yireoGoogleTagManager2Pusher({"event":"begin_checkout","ecommerce

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions