How to Add Custom JavaScript Code to Google Analytics Tracking

Do you want to add custom Javascript code to you MonsterInsights Google Analytics Tracking?

With MonsterInsight Pro, it’s easy—a spot is available in your settings to extend your Google Analytics Tracking.

Read on to learn how to add custom JS code your Google Analytics Tracking with MonsterInsights.

Step 1: Navigate to your MonsterInsights settings by navigating to Insights » Settings:


Step 2: Click “Advanced”.

Step 3: Scroll down the page to the custom code area.

Step 4: Then, on the advanced page, insert the custom code in the input box:


That’s it! Now Google Analytics will begin collecting data with your custom code. (Note, this is only JS for code, not PHP.)

Now you know where to add custom JS code in MonsterInsights to extend your Google Analytics tracking!

This feature is available in any of our Pro Package Tiers. Are you interested in learning how to setup Custom Dimensions with Monster Insights? See our guide: How to Set Up Custom Dimensions.