Title: How to implement the &quot;Code Insert&quot; functionality?
Last modified: August 21, 2016

---

# How to implement the "Code Insert" functionality?

 *  [diegocanal](https://wordpress.org/support/users/diegocanal/)
 * (@diegocanal)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/how-to-implement-the-code-insert-functionality/)
 * Hi,
 * I’ve noticed that the code is not being inserted where it should be (“Code to
   insert in head/foot when the user has/has not accepted cookies (Analytics code)”).
 * All those pieces of code are being inserted just before the closing body tag 
   of the page, within script tags with the type set to “text/template” (<script
   type=”text/template”></script>) and with a specific id, so I guess you have implemented
   client-side templating functionality.
 * How do I have to implement that templating functionality on my site? I know I
   should be using the given id’s to call those pieces of code from the right places
   but, could you please tell me the exact syntax?
 * Thank you
 * [https://wordpress.org/plugins/cartograf-cookie-filter/](https://wordpress.org/plugins/cartograf-cookie-filter/)

The topic ‘How to implement the "Code Insert" functionality?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/cartograf-cookie-filter_414249.svg)
 * [Cartograf Cookie filter](https://wordpress.org/plugins/cartograf-cookie-filter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cartograf-cookie-filter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cartograf-cookie-filter/)
 * [Active Topics](https://wordpress.org/support/plugin/cartograf-cookie-filter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cartograf-cookie-filter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cartograf-cookie-filter/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [diegocanal](https://wordpress.org/support/users/diegocanal/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/how-to-implement-the-code-insert-functionality/)
 * Status: not resolved