Learn business growth with Google Analytics 4 Forums Google Analytics 4 Exploring GA4 Measurement Protocol Integration for Chrome Extensions Reply To: Exploring GA4 Measurement Protocol Integration for Chrome Extensions

  • Evelyn

    Member
    15 September 2022 at 5:23 pm

    The person is trying to add GA4 analytics to a Chrome Extension using the Measurement Protocol with gtag, but faced an issue where no event data was being sent to GA despite no errors showing up in the console. The initial attempt used constant values for the measurement ID and API secret in a fetch URL in the Service Worker.

    After some adjustments to their code, they were able to solve the issue by directly inserting the values of the measurement ID and API secret into the fetch URL. Thus, the event data began successfully showing up in GA4. The changes showcased that the problem was related to how the constant values were being used in the fetch URL.