0
Completed

Offer to insert an IIFE template in Custom HTML tags

Olivier VIT 5 years ago updated by Supermetrics Support Team 5 years ago 3

It's good design to avoid inserting global persistent JS variables into the DOM
Then in many situations you could put your code into an IIFE and your variables vanish after the code has run

https://developer.mozilla.org/en-US/docs/Glossary/IIFE 

But it's a pain to type it in by heart
Offering to insert it would be nice

(function () {
    statements
})();

Answer

Answer
Completed

Done! It will be there in the next release.

Planned

I already have a default code block inserted when creating a custom JS var, so I guess I could do the same for custom HTML tags (although a custom HTML might not contain any JS code... but that's not a big issue).

Answer
Completed

Done! It will be there in the next release.