Forums
Forums / Plugin: GTM4WP - A Google Tag Manager (GTM) plugin for WordPress / Secondary DataLayer
(@retroriff)
9 years, 4 months ago
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.
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.
The topic ‘Secondary DataLayer’ is closed to new replies.