In GTM documentation there are ways to enable data layer by pasting a given code in the body section of website's source code for getting datalayer information of the purchase event. Now I have been doing creating custom html codes to push data in dataLayer inside GTM and capturing the data using JavaScript variables. So my questions are,
Both direct pasting of the gtag code inside website and using custom html inside GTM serves the same purpose to get the purchase information in datalayer?
If custom html tag inside GTM also serves the same purpose then how can if I have 3 product's which were purchase, how can I get multiple product name in the purchase event by the given code in GTM documentation as this code only have one item_name key? Does GTM and GA4 has naming conventions which we must follow?
Do I need to replace the static values with my original variables and if yes so what to do for multiple products in purchase events?
Tried to push data in data layer by unknowingly using random key names and not the ones recommended by GTM.