Forum Replies Created

  • Sure, I can simplify it a bit. To track how many clicks each menu items receive, you would first need to log custom events with Firebase. Now these custom events can be of two types – recommended and custom. Google suggests that you should implement the recommended ones as these can better enrich your data in the GA4 user interface.

    The custom events give you more flexibility. You can decide your own naming convention for event names and their parameters. Just remember to keep your naming structure consistent and create a simple documentation to track this.

    For tracking menu clicks, my suggestion would be to create a custom event named “navigation_click”. Now, this event will need more details about what specifically was clicked right? That’s where parameters like “name” come into play. You can fill in the name of the menu item that got clicked as the value for this parameter.

    Finally, remember to register this parameter in GA4 property so that these events can get tracked. Check out Google’s official documentation if you need step-by-step instructions.

  • Amit

    Member
    7 February 2023 at 9:54 pm in reply to: Making the Switch to GA4: Handling Legacy Code

    Hey there! Great job on setting up GA4 and connecting it with your original UA. Now, you don’t have to worry about the UA discontinuation, GA4 got you covered.

    If you feel the need, you can start shifting to GA4 more seriously by tracking onto a different property, while slowly getting your data folks familiar with GA4, including understanding the different metrics and dimensions.

    You may wonder about why we’re messing around with gtag if analytics.js serves the same purpose. Well, in theory, yes. But Google only permits analytics.js tracking format to transform it into GA4 data format and unfortunately, updates or maintenance for analytics.js are not expected after the discontinuation. It’ll keep working but limitations may arise over time.

    Your next move could be to eliminate your direct inline analytics function calls and transfer this logic to Google Tag Manager, its rightful place. So basically, you’re on the right track, now it’s just about progressing step-by-step. Keep it up!

  • Amit

    Member
    14 November 2022 at 5:53 am in reply to: How can I track form field values dynamically in GTM?

    You’re right, manually creating dataLayer variables for each index isn’t the most efficient method. You might want to consider going for a more dynamic approach. With GTM, you can create a single custom JavaScript variable to parse your form elements as needed, adding the flexibility you’re looking for. Just be mindful, though. If the form fields change – like if some are added or removed – your index values would also shift, causing your data to change unexpectedly. So while this method is more streamlined, it isn’t without its potential quirks. Still, it ought to make things a bit easier for you!