Learn business growth with Google Analytics 4 › Forums › Google Analytics 4 › Enhancing Google Analytics: Modifying Events and Properties with Custom Values › Reply To: Enhancing Google Analytics: Modifying Events and Properties with Custom Values
-
Setting up Google Analytics for specific event tracking like button clicks often requires careful management of properties (props) and events. In your case, you want to change certain ‘EVARs’ (Conversion Variables) and add new events without affecting others. Unfortunately, without seeing the actual code and the screenshot of the data analytics, it’s difficult to give specific advice.
However, usually, you can prevent changes in one property from affecting others by isolating the tracking scripts or implementing condition checks in your code. You can potentially encapsulate those tracking codes specific to PROP5 within an if-else clause, checking if event related is to button click. Plus, it’s important that your prop6 and prop7 aren’t said to equal prop5 or aren’t copying the input from prop5.
For adding new events like 100 and 101 for failed button clicks, you may want to use the ‘hitCallback’ function to fire an event when a tracked button click does not lead to the expected outcome. If done correctly, Google Analytics should then register this as a unique event.
Remember, applying this solution differs depending on the structure of your code and the specifics of the analytics implementation on your site. These are just suggestions and starting points for solving the issue you’re facing. If you’re still having trouble adjusting the properties and events as desired, it may be useful to consult with a developer who specializes in Google Analytics integration.