matomo-org / matomo-sdk-ios

Matomo iOS, tvOS and macOS SDK: a Matomo tracker written in Swift
MIT License
390 stars 164 forks source link

Add the possibility to track app installs #442

Open thibautRTE opened 9 months ago

thibautRTE commented 9 months ago

Hello,

My mobile application is available on IOS and Android. For IOS, when navigating to the graph in the Matomo Dashboard, the number of IOS application download remains on 0. Whereas it is working fine for Android. Can you give me the parameters that need to be set to have this information available

2023-12-13 18_30_21-éCO2mix iOS Production - 2023-12-12 - Rapports des statistiques web - - Profil 1

Thanks

brototyp commented 6 months ago

Hi @thibautRTE, does this issue still exist? Can you share more on what you are doing on the iOS application?

florismettey commented 6 months ago

Hello @brototyp , I got the same issue here. Android downloads display correctly whereas iOS download are always 0.

Context: The app is distributed on the App Store I'm using version 7.4.0 (pod 'MatomoTracker', '~> 7.4') We are able to get other tracking data (like custom events) and to display it on Matomo dashboards

Here is our code:

- (MatomoTracker*) getTracker {
    if (self.tracker == nil) {
        self.tracker = [[MatomoTracker alloc] initWithSiteId:self.siteId
                                                     baseURL:self.URL
                                                   userAgent:nil];
    }
    return self.tracker;
}

+ (void)trackScreenDisplay:(NSString*)tag mode:(NSString*)mode {
    if (tag && mode) {
        [[[MatomoService shared] getTracker] trackWithView:@[mode, tag]
                                                       url: nil];
    }
}

[RTEMatomoAnalyticsService trackScreenDisplay:@"Parameters" mode:@"test"];

Android:

Capture d’écran 2024-03-25 à 10 55 54

iOS:

Capture d’écran 2024-03-25 à 10 56 04
brototyp commented 5 months ago

Interesting. Thanks for the update @florismettey. Can you tell me how you get to this functionality in Matomo? On my instance, I am only gettin the visits, but no installations at all. Did you have to enable something specific?

Bildschirmfoto 2024-04-03 um 14 39 25
florismettey commented 5 months ago

I don't know exactly. I will try to ask the question to the people who configured it. From what I found, it seems to come from this menu: Comportement (Behavior) => Téléchargements (Download) On Android, we got some data but not on iOS

Capture d’écran 2024-04-03 à 15 07 55 Capture d’écran 2024-04-03 à 15 20 02
brototyp commented 5 months ago

Ah! I think Behavior – Download are things downloaded from within the Application or from the website. Looking at the tracking API, there is a download where one could pass on a URL.

This is currently not implemented on the iOS SDK side.

CamilleSQLI commented 5 months ago

Hello,

Thank you very much for your help. Do you know if this implementation in the iOS SDK is planned ?

Regards, Camille

brototyp commented 5 months ago

Hey @CamilleSQLI, I don't have it planned right now. But it's an interesting feature I think is worth adding to the iOS SDK as well.