Custom implemented views duration are not valid


#1

I implemented a custom views in IOS with these code :

[Countly.sharedInstance addExceptionForAutoViewTracking:@"Cart"];
[Countly.sharedInstance recordView:_strfmt(@"Cart")];

but often the duration of views is equal to zero or sums of the duration of some views for one of them and other views have zero duration.


#2

Hi @ssezavar - glad you are here and have a question. I have asked my colleague to respond to this. We'll keep you posted.


#3

Hi,

It is not clear what the problem is here.
Can you explain more?

addExceptionForAutoViewTracking is for excluding views from Auto View Tracking, and not related to what you are trying to achieve at all.

I recommend you to read view tracking docs one more time:
https://resources.count.ly/docs/countly-sdk-for-ios-and-os-x#section-view-tracking

And what does _strfmt do? Any chances that it returns nil?


#4

Hi,
I've read the docs again, unfortunately the instructions have not helped me achieve my goal yet.
What I'm trying to achieve here is to simply add custom names when I record my views. therefore, I've had to record the view manually, but while doing that I would have 2 records of one view with different names on my server and in order to solve that I called the addExceptionForAutoViewTracking right before I record my views.
_strfmt is a function that creates string with format and is tested so that can not be the problem.
My problem is that sometimes, auto view tracking does not track some of the views and therefore it creates problems with durations of the previous views.
am I doing something wrong here or should I implement something that I'm not already?