-
Notifications
You must be signed in to change notification settings - Fork 165
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
Event tracking: remove "example.com" url. #194
Comments
We have this similar problem too. |
You can create your own custom events where you can set the URL as described here. But it would be nice to be able to set a base URL once, maybe in And similar behaviour when tracking events. Ie. the url sent with the event would be this base url, along with optional screen names. |
Is the URL necessary? I would rather just leave it empty/null by default... the Android SDK works like that it seems. |
I think the easiest way for now would be to add a url parameter to the event tracking function. This would be consistent with tracking a view (where you can already do that). Additionally I like the idea of defining the "http://example.com" once and we use it to generate the url if none is given. As described here the url is a required field. @mattab Is this really the case? Is it possible to ditch the url since in most/some cases one on mobile there aren't urls matching the content in the app? |
@brototyp Turns out in reality the URL is not required and actually optional. Fixed the developer documentation in: matomo-org/developer-documentation#195 You can therefore make it optional in the SDK 👍 |
Hi @mattab, great news. Then the only question is, if we want to keep the "auto url generation"-method, or if it can be defined per view- oder event-tracking and be not set per default. I think I like the latter most, since the default mechanism will probably very rarely be correct. |
It would be helpful in general to be consistent between SDKs, especially with Android SDK so the generated data is similar. |
That is a good point. As far as I can see, the Android SDK derives the base url from the app identifier and then uses the action path as the url path. Currently we do the same, but use "example.com" as base url. We could, without an issue, do the same in the iOS SDK. Still, I am not sure if we should go this way. This only makes sense, if the action path in the app is semantically the same as the url path. I don't think it makes sense to expect that as a default. |
What would be the alternatives? (IMHO the option "No url" at all is not useful, so wondering if there are other options) Otherwise sounds good to use same technique as the Android SDK ("derive the base url from the app identifier") |
I am thinking the other way round: What information do we want to add, when we add a URL to a tracked view or event. From an app's perspective, the only thing I can see (please correct me if I am wrong) is to match a certain app-content to a content that is also available on the web. If we generate a url from data that we push to the server anyways (for example if the path is generated from the action segments), we don't add any information and there will be barely a case where the autogenerated url matches a real content from the web. I this case I think there is no use in just sending "some url". Am I wrong here with my thoughts? |
Agreed, I think most use cases is to match app-content with web-content. And when doing event tracking, it would be nice to be able to just pass in an 'An array of hierarchical screen names' as is the case with screen view tracking. Preferably without having to enter a base url everytime, since that doesn't change. |
What do you think about the following plan: We start by merging this pull request: #195 It simply removes the example.com domain. And in a different Ticket we sketch out if we want to have automatic url generation and the necessities for it. |
The implementation was merged and is part of the next release. |
I just found out that the backed behaves differently from what I thought, especially for page views. I changed my proposal here: #197. I am open for different views on the topic. |
Hi!
I would like use the event tracking but have a problem.
We can see the events on the dashboard but we would like remove the "example.com" url from actions.
As I have seen it has been hard coded into source code.
Could you please provide a possibility to change this url?
Thanks.
The text was updated successfully, but these errors were encountered: