Title: Adding a dataLayer
Last modified: August 22, 2016

---

# Adding a dataLayer

 *  Resolved [lfaber](https://wordpress.org/support/users/lfaber/)
 * (@lfaber)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/adding-a-datalayer/)
 * Hi Tomi: First off — thanks for taking the time to create this plugin. It is 
   my “go to”for all client sites where they need GTM (which is all of them IMHO!).
 * I need to add a dataLayer in order to implement tracking of Vimeo videos on a
   client site. My plan is to add the dataLayer in the usual location just before`
   <?php if ( function_exists( 'gtm4wp_the_gtm_tag' ) ) { gtm4wp_the_gtm_tag(); }?
   >`.
 * Are there are any issues you can think of with doing things this way? Or is this
   the “only way to go”?
 * [https://wordpress.org/plugins/duracelltomi-google-tag-manager/](https://wordpress.org/plugins/duracelltomi-google-tag-manager/)

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

 *  Plugin Author [Thomas Geiger](https://wordpress.org/support/users/duracelltomi/)
 * (@duracelltomi)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/adding-a-datalayer/#post-5263890)
 * Hi,
 * Thanks for your feedback, I’m glad to have you as a user!
 * I would add the necessary code in the <head> part so that every dataLayer variable
   is be available while GTM loads.
 * BTW YouTube/Vimeo tracking is on the top of my list for the coming versions 😉
 * Thomas
 *  Thread Starter [lfaber](https://wordpress.org/support/users/lfaber/)
 * (@lfaber)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/adding-a-datalayer/#post-5263919)
 * Thanks for your reply Thomas. I just wanted to be 100% certain. I am looking 
   forward to the video integration with the plugin. 🙂

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

The topic ‘Adding a dataLayer’ is closed to new replies.

 * ![](https://ps.w.org/duracelltomi-google-tag-manager/assets/icon-256x256.png?
   rev=1708451)
 * [GTM4WP - A Google Tag Manager (GTM) plugin for WordPress](https://wordpress.org/plugins/duracelltomi-google-tag-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/duracelltomi-google-tag-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/reviews/)

## Tags

 * [datalayer](https://wordpress.org/support/topic-tag/datalayer/)
 * [Tag Manager](https://wordpress.org/support/topic-tag/tag-manager/)

 * 2 replies
 * 2 participants
 * Last reply from: [lfaber](https://wordpress.org/support/users/lfaber/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/adding-a-datalayer/#post-5263919)
 * Status: resolved