title: GA4 with GTM - sending the items array as an event parameter without using datalayer?
body: <p>Using GA4 with GTM.  I'm questioning how to send an array for an event.  For example, the add_to_cart event.  In my situation I am triggering the tag on my purchase links.  On those links I added data parameters for the id, name, and value such as :</p>
  <pre><code>&lt;a href=&quot;https://example.com/sales/link&quot; data-id=&quot;prodid&quot; data-name=&quot;prodname&quot; data-value=&quot;179.95&quot;&gt;Buy Now&lt;/a&gt;
  </code></pre>
  <p>There are multiple and the id, name, and value are the only things that change for each link.</p>
  <p>Google requires an items array to be sent with the add_to_cart event.  Can I enter the items array as shown in this picture using dot notation?  I can't supply this information in the datalayer which is why I am grabbing the values that can be different from the link itself (data parameters)... the rest are static and won't change.  I can't find any way to create an array variable in GTM so the dot notation is the only thing I could think of.</p>
  <p>Is there another way to do this I am missing or not thinking of?</p>
  <p><a href="https://i.stack.imgur.com/TDrPg.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TDrPg.jpg" alt="ga4" /></a></p>