Appendix B. Developer Reference

Client Configuration

The global settings reach the script as JSON in the page's head:

<script type="application/json" id="cls-ad-config">
{"lazy":true,"collapse":true,"fallback":false,"debug":false,"clientId":"ca-pub-1234567890123456"}
</script>

debug is true only when Debug is on and the current user can manage CLS Ad Slot.

The script, media/com_clsadslot/js/main.js, is an ES module. It loads only the parts it needs for the settings that are on: lazy.js, fallback.js, collapse.js and debug.js. When lazy loading, collapsing, fallback and debugging are all off, CLS Ad Slot's script isn't added at all; only the AdSense script is.

On This Page