The sendGTMEvent function
Unanswered
Pshdar Dog posted this in #help-forum
Pshdar DogOP
This seems like it might need to be updated in the documenation.
https://nextjs.org/docs/app/building-your-application/optimizing/third-party-libraries#sending-events
Based on the link referenced in the next documentation I think all the parameters to sendGTMEvent need to be in an object and structred as such:
https://developers.google.com/tag-platform/tag-manager/datalayer#use_a_data_layer_with_event_handlers
https://nextjs.org/docs/app/building-your-application/optimizing/third-party-libraries#sending-events
Based on the link referenced in the next documentation I think all the parameters to sendGTMEvent need to be in an object and structred as such:
sendGTMEvent({
event: "event",
action: "buttonClicked",
value: "xyz",
});https://developers.google.com/tag-platform/tag-manager/datalayer#use_a_data_layer_with_event_handlers