Dmx.parse not working on var function and not run the console.log

Hi guys, i have the problem.

I need insert the meta tag facebook script on my website, so, need inside with dynamic function.

i used the begin script.

check this:

<dmx-value id="mypixels" dmx-bind:value="sc_checkfbpixels.data.fbpixels[0].pixelID"></dmx-value>

    <!-- Meta Pixel Code -->

    <script>

        function myFunction() {

        var pixels = dmx.parse('mypixels.value');

        console.log(pixels);

        }

        

    </script>

    <!-- End Meta Pixel Code -->`Preformatted text`

I need help, thanks for much.

Community Page
Last updated: