angulartics / angulartics-piwik

Piwik plugin for Angulartics
MIT License
27 stars 14 forks source link

Event tracking gives undefined category and name #10

Closed BastianHofmann closed 7 years ago

BastianHofmann commented 7 years ago

I want to track an event like this: $analytics.eventTrack('login', { category: 'auth', label: 'success' });

When this code is run I get a new event in my piwik installation as expected, but the category is set to undefined and the name says Event Name not defined (Action is set to auth). I want category = auth, action = login, name = success.

Am I missing something? I took the code from http://angulartics.github.io/#/event-tracking "Using the API".

WuglyakBolgoink commented 7 years ago

Hi @BastianHofmann any news?

BastianHofmann commented 7 years ago

@WuglyakBolgoink Currently working with the same code. Not sure what I changed, sorry.

WuglyakBolgoink commented 7 years ago

@BastianHofmann How do u do EventTracking? on my dev-Server I can't see any events on piwik, but plugin response send 200-OK back.

sendEventWithParams: function(category, action, label, value, params) {
    // $window.ga('send', 'event', category, action, label, value); // old

    $analytics.eventTrack(category, {
        category: category,
        label: label,
        action: action,
        value: value,
        params: params
    });
}