-
Notifications
You must be signed in to change notification settings - Fork 166
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
Can I use customTrackingParameters to override the default cdt time format? #360
Comments
Hi @Isaacwhyuenac, I think that should work. Out of curiosity: Why do you want to use a unix timestamp instead of the current ISO8601 format? |
@brototyp thanks for the reply. But it looks like it is not working because there would have two cdt key in the final url string. One in iso8601 and one in unix time stamp. Want this feature because we have some tracking events that fire together in some mini seconds difference. It would help to visualise and order the user’s journey more fully. |
Oh, your are correct. Currently, there is no way to replace the value of a parameter. You can only add some. I think your use case actually is one that the SDK should handle per default. I'll implement a fix for it. |
Fixed and merged. This will be in the next release. |
Thank you for the reply, but your changes are somehow not what I am expecting, which is to make cdt value unix timestamp (something like 1607875978284). |
That's true. The cdt parameter is still a ISO8601 timestamp, but now it does contain milliseconds. Is that sufficient, or is there a reason to have the unix timestamp specifically? |
Because our data pipeline use unix timestamp specifically 🤣, but also the matomo documentation somewhat allows us to use unix timestamp too. Just wondering if here can somehow allow user to override the default params format on every request, using something like JavaScript Array.reduce function. I am not a Swift developer, so I don't know if Swift can do this or is here the correct place to allow my desired behavior. Hope I have made my case clear. Some matomo implementation, like in obj-c and js use unix timestamp. Java, for example, use iso8601 but allows overriding. So somewhat I am hoping an alignment of matomo sdk. |
Hi @Isaacwhyuenac, I see. I think it would be a good idea to be able to override some parameters with exactly the ones you like to use. There is the risk in accidentally overriding some, but I think that can be mitigated a bit by documentation. |
Hey @Isaacwhyuenac, can you try out this PR: #370. That should work fine now. |
@brototyp It seems working fine. Thanks |
This is now implemented and part of the latest release, v7.5 |
Hi, I would like to ask if I can pass a
cdt
incustomTrackingParameters
to override the defaultcdt
value (ISO8601) value of the tracker? I would want to override it because I want it to be in unix timestamp (13 digits).The text was updated successfully, but these errors were encountered: