Using Geotargetly with Discourse

Hi everyone, it’s my first post here but I’ve been using Discourse for my community for one year now.

I have a question regarding an integration I’m struggling with. I’m using Geotargetly on my main site to display personalised content as I have readers from different French-speaking countries. It’s been working great so I thought about using it on my forum for in-house ads. So basically what I did is add the required geocontent code in the body section of the theme customization:

s=function(){var def='geotargetlygeocontent1587255810065_default',len=g.getElementsByClassName(def).length;
<noscript><style>.geotargetlygeocontent1587255810065_default{display:inline !important}</style></noscript>

Then I modified my in-house ad by adding the Geotargetly smart tags as follows:

<span class='geotargetlygeocontent1587255810065_default' style='display:none;'>
-- My ad content here --

On my main site I would just add for example three different smart tags for three different countries and it would display the correct content depending on the country.

Unfortunately it doesn’t work at all with my Discourse forum. The in-house won’t display at all when I wrap it inside the geo smart tags. Is there anything I’m doing wrong, or are there limitations with in-house ads I’m not aware of?