Age gate not showing on home page I am working on a client's website and need to implement this age gate on it. The problem is it only shows on a specific url/page but not on other pages. Been looking for solutions since past 2 days but couldn't find anything on google about it.

This is what I did:

Added the shown below in html.html.twig and uploaded the relevant css and html. But the age gate popup only shows on www.xyz.com/?AvpClearCookie=1 but not on the www.xyz.com

&lt;!-- Age Gate: START --&gt;
&lt;script defer="defer" async&gt;
(function(doc, url, tag) {
var js=doc.createElement(tag),fjs=doc.getElementsByTagName(tag)[0];js.src=url;fjs.parentNode.insertBefore(js,fjs.nextSibling);
}(document, '//avp3.azureedge.net/api/ballantines/avp/?language=en&amp;callback=test_cb', 'script'));
&lt;/script&gt;&lt;div id="avp"&gt;&lt;/div&gt;
&lt;!-- Age Gate: END --&gt;


I was trying to show it on home page but with the very limited knowledge I have about drupal it seeming difficult for me to get it done. Really appreciate if anybody could show me some light on this.
Maybe it's a cache issue, so you can try to externalize your script and call it with random parameter

&lt;script type="text/javascript" src="path/to/my/script.js?itok=1561313215" defer="defer" async&gt;&lt;/script&gt;


You can generate a random value with php with microtime by sample

Try it and let us know if helps you