Closed maxmika closed 6 years ago
Hi @maxmika, which version of the SDK are you using?
I guess you are using an older (< 4.0) version of the SDK. Please consider upgrading to the latest version.
Nevertheless. The issue is still in the newest version. I will dig into it and see if I can find a solution.
@maxmika Thanks for the bug report. I just pushed the fix to #218. Please have a look and validate, that it fixes your issue.
@brototyp Your fix works just fine for us – I would be grateful if you could apply it to the CocoaPods Version asap!
Thank you very much fur your quick solution!
Hi @maxmika, thanks for checking the changes. I just merged it. It will be part of the next release.
Thank you, @brototyp . Can you already tell when the next release will be published (approximately)?
Hi @maxmika, I just released 4.4.2 containing this fix.
We encountered a problem with Piwik action strings which contain the ampersand symbol (&).
What we did:
When we send the Piwik event (let's say
"Imprint␣&␣Disclaimer"
) as a single one using the ...... function, everything works fine.
Now let's say a network error occurs. The event is saved and sent as a bulk together with the next Piwik event.
In this case, both event parameters are sent in the body of the
NSURLMutableRequest
.The Problem:
What we receive in our Piwik backend system for the first string is only
Imprint␣
, thus not matching withImprint␣&␣Disclaimer
. That means, the&
symbol is interpreted as a URL Parameter separator.What we tried
is to escape all ampersand signs with
%26
for events sent as bulk and with&
for request with just a single event. Doing so, we could at least achieve a&
in both cases in our backend, but we had to modify the Piwik SDK framework code.Question
Is there a way to send actions containing an ampersand symbol without modifying the SDK's code? What do you suggest?
Thanks for your help in advance!