We would like to trigger the JavaScript events API from the GTM with the data that comes from the DataLayer to create a contact when a sale is made. Let's say we can trigger this from the GTM with the visibility of one element in a page.
Can somebody help me with the code I would need to use?
Event ID: XXXXXXXXX
Before we get too in the weeds, are there reasons why you wish to go through Google Tag Manager instead of implementing the identify and trackEvent methods on their own?
That said, if you're familiar with implementing custom scripts in GTM, I think you would just place something like the following into the tag's HTML field: