Hoe moeten CMP's worden ingezet in het licht van script tags voor templates en JS API die gemoderniseerd worden

In light of this announcement (Modernizing inline script tags for templates & JS API), script type =’text/discourse-plugin or script type=’text/x-handlebars’ have been deprecated.

However, it is essential in the EU & UK to have a CMP (consent management platform), in order to collect for ads and tracking.

This includes AdSense, GAM, Google Analytics and most other vendors. Without a CMP, almost no ads will show and site owners will be breaking privacy and consent laws.

What is the best practice for implementing CMP script moving forward?

Previously I had code in the header but I now receive admin errors and it seems this will get nuked in September. An example of the code I am using below:

My site is gasroom.org

Thank you!

U kunt deze code verplaatsen naar het tabblad ‘JS’ in een thema (onder ‘CSS/HTML bewerken’), zonder de scripttags. Plaats deze code binnen het apiInitializer-gedeelte.

U kunt vervolgens Discourse.user.current() wijzigen in iets als api.getCurrentUser().

1 like