I'm adding a tracking code to a Magento 2 demo in Stores > Configuration > General > Design > Footer > Miscellaneous HTML. However, after clicking on "Save Config" the code is showing in the Misc. HTML box, but it doesn't show in the code before the body tag. I added it to a M1 website and it's working fine. How can I fix the issue?

Here's the code:

<!-- Piwik -->
<script type="text/javascript">
  var _paq = _paq || [];
  (function() {
    var u="//shopgome.piwikpro.com/";
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    _paq.push(['setSiteId', 3]);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
<noscript><p><img src="//shopgome.piwikpro.com/piwik.php?idsite=3" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->

Thank you

  • Have you cleared your block cache?
    – Smartie
    Commented Feb 7, 2016 at 19:03
  • @Smartie yep. Still nothing.
    – Zaina
    Commented Feb 8, 2016 at 6:46

2 Answers 2


I did some digging seems like the system setting design/footer/absolute_footer is not being referred anywhere in the code base, or any template file.

I have created a issue on github for this

Footer Miscellaneous HTML Not working

For now you can add the tracking code using:

General -> Design -> HTML Head -> Miscellaneous Scripts.

  • Bug still present in 2.2.4 also HTML head option is bugged Commented Sep 7, 2018 at 13:46

Since Magento 2.1 Design settings was moved to Content/Design/Configuration

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.