This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios') | |
// This is the interface/object for communicating with GA4MP | |
export function GA4MPClient(apiSecret, measurementId, clientId) { | |
// Vars for GA4 connection | |
this.API_SECRET = apiSecret; // GA > Admin > Data Streams > choose your stream > Measurement Protocol > Create | |
this.MEASUREMENT_ID = measurementId; // GA Admin > Data Streams > choose your stream > Measurement ID |