I am in the process of setting up a dataLayer for my website, but I have encountered an issue. My understanding is that Google Tag Manager dataLayer functions in a way where you have one central dataLayer object containing all the data variables. Each time you use dataLayer.push, it adds more data to this single object. However, in my case, separate objects are being created. You can view screenshots of how it looks here: https://i.stack.imgur.com/hOqJw.png
The first object is my main dataLayer; here is the code:
https://i.stack.imgur.com/jdKok.png
The fourth object is another dataLayer created using dataLayer.push, which should ideally be added to the existing one.
https://i.stack.imgur.com/WUMbF.png
Instead of having just one object, I now have two, and adding more .push methods will create even more objects.
How can I ensure that all my dataLayer.push commands add data to my main dataLayer instead of creating additional objects?
https://i.stack.imgur.com/hZXn9.png
Please review and let me know if I'm overlooking something significant. I am new to this and struggling to understand why I don't end up with a single complete dataLayer object.