Title: Secondary DataLayer
Last modified: January 23, 2017

---

# Secondary DataLayer

 *  Resolved [retroriff](https://wordpress.org/support/users/retroriff/)
 * (@retroriff)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/secondary-datalayer/)
 * Hello,
 * I need to send a VirtualPageview event and I would like to know if is it a problem
   that I add a secondary dataLayer in my source code, or there should be only one?
 * Thank you.
    -  This topic was modified 9 years, 6 months ago by [retroriff](https://wordpress.org/support/users/retroriff/).

Viewing 1 replies (of 1 total)

 *  Thread Starter [retroriff](https://wordpress.org/support/users/retroriff/)
 * (@retroriff)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/secondary-datalayer/#post-8691115)
 * Rule of thumb: do not redeclare the dataLayer variable so avoid such codes in
   your own lines:
 * dataLayer = []
 * or
 * dataLayer = new Array();
 * Simply using dataLayer.push() commands in your own sections should be safe.

Viewing 1 replies (of 1 total)

The topic ‘Secondary 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/)

 * 1 reply
 * 1 participant
 * Last reply from: [retroriff](https://wordpress.org/support/users/retroriff/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/secondary-datalayer/#post-8691115)
 * Status: resolved