• Resolved Kevin

    (@astianax)


    Hey guys!

    I would like to track the reservations with GA4. I tried to track form submissions with Google Tags Manager, but it’s not working.

    Do you have a add_action or add_filter that is linked to the form submission? Or what can I do to follow those submissions?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author catkin

    (@thecatkin)

    Hi Kevin,

    There is javasript code on file restaurant.js that raises google event.

    Try to change this for GA4 according to this suggestion: https://www.analyticsmania.com/post/google-tag-manager-custom-event-trigger/

    Let me know if that works, I will update the plugin too

        function ga_event(event, comment) {
            if (typeof _gaq !== 'undefined') {
                _gaq.push(['_trackEvent', 'ReDi Restaurant Reservation', event, comment]);
            }
        }
    Thread Starter Kevin

    (@astianax)

    Thanks for your answer ??

    I’ve updated the function with a GA4 event :

        function ga_event(event, comment) {
            window.dataLayer = window.dataLayer || [];
            window.dataLayer.push({
             'event': event,
             'comment': comment
            });
        }

    I tracked the event with the custom event on Tags Manager :

    ga_event('Reservation confirmed', '');

    And now I am waiting on Analytics to see it’s fired correctly !

    Thread Starter Kevin

    (@astianax)

    Event is fired perfectly, thank you for the help mate!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘GA4 event’ is closed to new replies.