mautic / Community-Portal

Mautic's community governance portal, based on Decidim.
https://community.mautic.org
GNU Affero General Public License v3.0
3 stars 5 forks source link

Add Mautic tracking code to the correct place for Marketing consent #16

Closed RCheesley closed 1 year ago

RCheesley commented 1 year ago

According to the docs:

The recommended place for scripts is app/views/layouts/decidim/_head_extra.html.erb

Source: https://docs.decidim.org/en/develop/customize/data_consent

Code to be installed:

<script>
    (function(w,d,t,u,n,a,m){w['MauticTrackingObject']=n;
        w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments)},a=d.createElement(t),
        m=d.getElementsByTagName(t)[0];a.async=1;a.src=u;m.parentNode.insertBefore(a,m)
    })(window,document,'script','https://m.mautic.org/mtc.js','mt');

    mt('send', 'pageview');
</script>

I would probs be able to do this if I could have some step by step instructions how to do this eg with Visual Studio Code?

RCheesley commented 1 year ago

Actions:

RCheesley commented 1 year ago

@froger could you please provide instructions on where I can add this information? This is a blocker to going live.

RCheesley commented 1 year ago

screenshot-townhall mautic org-2023 09 27-11_06_00