matomo-sdk-android icon indicating copy to clipboard operation
matomo-sdk-android copied to clipboard

trackOutlink() is not working

Open JeffreyVanelderenACA opened this issue 2 years ago • 6 comments

Version: implementation 'com.github.matomo-org:matomo-sdk-android:4.1.4

I'm using the iOS and Android SDK for my React Native app. I wrapped the SDK's and everything is working (initialize, trackCategory, ... ) and showing up on the matomo dashboard. Only trackOutlink is not working. I verified that the method is called and executed, but it is never showing up on the dashboard.

@ReactMethod
    fun trackOutlink(args: ReadableMap) {
        val link = args.getString("link");
        getTrackHelper()?.outlink(URL(link))?.with(sharedMatomoTracker);
    }

    private fun getTrackHelper(): TrackHelper? {
        if (sharedMatomoTracker == null) {
            throw RuntimeException("Tracker must be initialized before usage")
        }
        var trackHelper = TrackHelper.track()
        for ((key, value) in customDimensions.entries) {
            trackHelper = trackHelper.dimension(key, value)
        }
        return trackHelper
    }

Dashboard (filtered for the whole month):

Screenshot 2023-01-16 at 15 56 28

JeffreyVanelderenACA avatar Jan 16 '23 14:01 JeffreyVanelderenACA

@d4rken knows the most about the API

hannesa2 avatar Jan 16 '23 15:01 hannesa2

Looks okay afaict. Check in debug logs if data is being dispatched to your server. Is the URL format valid? I faintly remember that a few years ago the tracker was picky about the URL format being correct.

d4rken avatar Jan 17 '23 10:01 d4rken

@d4rken The URL's should be valid, it's an URL like https://apps.xxxx.xxx/webportal, I've tried some other dummy URL's as well but it's not showing up. I also don't think the URL class would take invalid url's

JeffreyVanelderenACA avatar Jan 18 '23 06:01 JeffreyVanelderenACA

Any updates on this issue?

JeffreyVanelderenACA avatar Feb 20 '23 08:02 JeffreyVanelderenACA

@d4rken Hi, can you provide a status update if any?

JeffreyVanelderenACA avatar Apr 05 '23 11:04 JeffreyVanelderenACA

I have not looked into it further. Currently have no extra time for this project.

d4rken avatar Apr 05 '23 13:04 d4rken