Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trackOutlink() is not working #396

Open
JeffreyVanelderenACA opened this issue Jan 16, 2023 · 6 comments
Open

trackOutlink() is not working #396

JeffreyVanelderenACA opened this issue Jan 16, 2023 · 6 comments

Comments

@JeffreyVanelderenACA
Copy link

JeffreyVanelderenACA commented Jan 16, 2023

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

@hannesa2
Copy link
Collaborator

@d4rken knows the most about the API

@d4rken
Copy link
Member

d4rken commented Jan 17, 2023

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.

@JeffreyVanelderenACA
Copy link
Author

@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
Copy link
Author

Any updates on this issue?

@JeffreyVanelderenACA
Copy link
Author

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

@d4rken
Copy link
Member

d4rken commented Apr 5, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants