• Resolved Cedernet

    (@cedernet)


    Hi!

    I used to have this code that tracked the events:
    var myEvent = $(this).data(“my”);
    ma.trackEvent(myEvent, ‘ClickOut’);

    And it worked good it sent the event to ga4 with my the correct parameter. Now i can’t gte the new way of doing it to work. I tried this:
    track({ type: ‘ClickOut’, event: {‘event_category’: myEvent} });

    it does track the event but it won’t send the parameters. Any ideas how to fix this?

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

    (@daanvandenbergh)

    CAOS uses this Minimal Analytics library. So, you should change the code according to the documentation. Keep in mind that parameter names in GA4 have also changed. Possibly the “ClickOut” type is invalid. You can use the GA4 event builder to test its validity.

    Thread Starter Cedernet

    (@cedernet)

    Type can contain anything so it can’t be invalid and now i noticed that the parameters do work, but differently than i thought. You can only add custom parameter key and the value for it… i guess…

    I can’t find any documentation about how to add an Event Category parameter.

    I have read the documentation a couple of times and it doesn’t tell me the answer. I tried to contact the MA4 developer, but he does not reply. So i’m just hoping and trying my luck if you know the answer ??

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Sorry, but I can’t help you with that as I didn’t build the library. Hopefully the developer will reply sometime soon.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How does the minimal GA4 work?’ is closed to new replies.