Archived topic
How to add script just before tag
5 replies · Started by Balendu on July 31, 2021
Hey,
I wanted to paste the following code just before </body>tag. How can I do this. I am using latest version of GP premium.
<script> var websiteId = “03dc78b3-e5a6-4755-ae63-4220273c12b5″;</script> <script src=”https://app.qualzz.com/assets/trackingScript/webtracking.js” type=”text/javascript”></script>
Hi there,
You can use a hook element:
https://docs.generatepress.com/article/hooks-element-overview/
With the wp_footer hook:
https://docs.generatepress.com/article/wp_footer/
I have done this but still it's not working.
Can you show a screenshot of the hook element?
https://docs.generatepress.com/article/using-the-premium-support-forum/#uploading-screenshots
And make sure you've cleared any caching plugins or server cache if you are using it.
The theme itself has no way of stopping the code from working.
The hook is also a WordPress default hook.
Thanks,
It working Now
No problem :)