How can I push data into the dataLayer in webflow?
I’m looking to setup server side GTM tracking and setup my Google Ads Conversions. I have the GTM Code in the all settings head code. Problem is now that I cant add code ABOVE that on a single page. I’d like to add a dataLayer script but that needs to be above the GTM code in order to be picked up.
Hey Jan, I just saw your post and I was recently able to set up a fully functioning enhanced ecommerce tracking through GTM server side, so I hope you can still find some value from this reply
Firstly, you need to declare the datalayer above the GTM in the , and you need to do this just once, in the all settings head code.
Then, the datalayer scripts pushing event data should be in each page’s “Before </body> tag” section
Essentially: declare in the head, use in the footer