0

I'm currently integrating Google Analytics tracking into my application, and I have a specific question about handling different domains.

Domain 1: Website (e.g., https://mywebsite.com)

I want to track all enhanced measurements created by Google Analytics as well as custom events.

(Sub-)Domain 2: Webapp (e.g., https://app.mywebsite.com)

I only want to track custom-triggered events like sign_up or login.

The problem I'm facing is that I can't seem to disable enhanced measurement events ONLY for the web app. My current configuration looks like this (I'm using react-ga4):

ReactGA.initialize('G-XXXXXXX', { 
  gaOptions: {
    send_page_view: false, // Not working  
    transport_url: 'https://metrics.mywebsite.com', 
  },
  gtagOptions: {
    enhanced_measurement_settings: {
      scrolls: false, // Not working
    },
  },
  gtagUrl: 'https://metrics.mywebsite.com/gtag/js',
});

Is it possible to disable these standard enhanced events via JavaScript? If not, what is the correct method to implement this?

1 Answer 1

1

Going by [GA4] Enhanced measurement events I would understand that these configurations are done only via the Google Analytics admin panel.

  • Make sure you have separate data streams for website vs webapp
  • In the admin panel go to Data collection and modification
  • Click Data streams and select your stream by name
  • Under Enhanced measurement there is a toggle to enable enhanced measurements
    • Use the cogwheel to disable/enable events individually
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.