Title: Javascript error when calling printGtmHeader
Last modified: February 27, 2020

---

# Javascript error when calling printGtmHeader

 *  [zachdlang](https://wordpress.org/support/users/zachdlang/)
 * (@zachdlang)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/javascript-error-when-calling-printgtmheader/)
 * On version 3.0, it seems like there’s a bug in Javascript when you call the following
   line:
 * `ecl_scripts.innerHTML = <?php echo $this->printGtmHeader(); ?>;`
 * This results in an error in Javascript, due to an unexpected `;`:
 * `ecl_scripts.innerHTML = ;`
 * I think this is because `printGtmHeader` is using `gtm_header`, whereas everything
   else is using `ecl_gtm_header`.
    -  This topic was modified 6 years, 3 months ago by [zachdlang](https://wordpress.org/support/users/zachdlang/).
      Reason: Adding more information

The topic ‘Javascript error when calling printGtmHeader’ is closed to new replies.

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

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * 0 replies
 * 1 participant
 * Last reply from: [zachdlang](https://wordpress.org/support/users/zachdlang/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/javascript-error-when-calling-printgtmheader/)
 * Status: not resolved