Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WouterNieuwerth/8c8c2a601951e693a1813918e88deb8b to your computer and use it in GitHub Desktop.
Save WouterNieuwerth/8c8c2a601951e693a1813918e88deb8b to your computer and use it in GitHub Desktop.
// Send data to GA4
const getAllEventData = require('getAllEventData');
const sendEventToGoogleAnalytics = require('sendEventToGoogleAnalytics');
const events = getAllEventData();
sendEventToGoogleAnalytics(events, (response) => {
data.gtmOnFailure();
});
// Call data.gtmOnSuccess when the tag is finished.
data.gtmOnSuccess();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment