Title: Add a hook to code-universal.php?
Last modified: August 22, 2016

---

# Add a hook to code-universal.php?

 *  Resolved [survivehive](https://wordpress.org/support/users/survivehive/)
 * (@survivehive)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/add-a-hook-to-code-universalphp/)
 * Would it be possible to get a hook added to code-universal.php?
 * I’d like to use Google Analytics – Enhanced Ecommerce which requires
    `ga('require','
   ec', 'ec.js');` to be added to the analytics code. I am currently manually adding
   it, but with each update I have to manually re-add it.
 * I guess another solution would be to make it an option in the settings.
 * Thanks!
 * [https://wordpress.org/plugins/google-analytics-dashboard-for-wp/](https://wordpress.org/plugins/google-analytics-dashboard-for-wp/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Alin Marcu](https://wordpress.org/support/users/deconf/)
 * (@deconf)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/add-a-hook-to-code-universalphp/#post-5219789)
 * Add it one more time :), in v4.3.4 you’ll have a hook for that.
 *  Thread Starter [survivehive](https://wordpress.org/support/users/survivehive/)
 * (@survivehive)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/add-a-hook-to-code-universalphp/#post-5219796)
 * You rock Alin! Thank you! Looking forward to the update!
 *  [Alin Marcu](https://wordpress.org/support/users/deconf/)
 * (@deconf)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/add-a-hook-to-code-universalphp/#post-5219797)
 * If you want you can replace the **front/tracking/code-universal.php** with this
   one:
 * [https://github.com/deconf/Google-Analytics-Dashboard-for-WP/blob/master/front/tracking/code-universal.php](https://github.com/deconf/Google-Analytics-Dashboard-for-WP/blob/master/front/tracking/code-universal.php)
 * the action hook is **ga_dash_addtrackingcode**

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Add a hook to code-universal.php?’ is closed to new replies.

 * ![](https://ps.w.org/google-analytics-dashboard-for-wp/assets/icon.svg?rev=2243225)
 * [ExactMetrics - Google Analytics Dashboard for WordPress (Website Stats Plugin)](https://wordpress.org/plugins/google-analytics-dashboard-for-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-analytics-dashboard-for-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-analytics-dashboard-for-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/google-analytics-dashboard-for-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-analytics-dashboard-for-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-analytics-dashboard-for-wp/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Alin Marcu](https://wordpress.org/support/users/deconf/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/add-a-hook-to-code-universalphp/#post-5219797)
 * Status: resolved