Rich-text Reply

Track view goal on iOS

icalo 04-22-16

Track view goal on iOS

I'm using Optimizely SDK on a native iOS application.

I created some custom goals and now I need some "View Goal".
I cannot find anything to track this kind of goal. The documentation [1] says

 

    For more details and to learn about tap and view goals, refer to the following article from our Knowledge Base.

 

But the linked article is about web tracking and not about iOS.

 

If I try to add a ViewGoald directly from the editor, the list of views is empty.

 

Does someone have any advice?

 

Thanks.

 

Screen Shot 2016-04-22 at 16.47.52.png

 

[1] http://developers.optimizely.com/ios/reference/#track-event

Level 1

tedroddy 04-22-16
 

Re: Track view goal on iOS

icalo,

 

Sorry about that link pointing to the wrong article. I believe the article that it should have linked to is one of these:

https://help.optimizely.com/Track_Conversion_Goals/Goals:_Measure_the_success_of_your_experiment

https://help.optimizely.com/Get_Started/Get_Started_on_Mobile_Optimization

 

To set up a view goal, follow these steps:

  1. Put your app into Edit Mode and open the Editor for your experiment. This should connect your app to the Editor.
  2. Click the Goals button at the top right and choose "Create new goal".
  3. Change the Goal Type to "View"
  4. Navigate your app to the view that you want to track with this goal.
  5. You will see view selectors populate into the goal Editor as you navigate through your app. 
  6. When your goal contains the view selector(s) for the view(s) you want to track, save your goal.

 

I'll update the documentation to be more descriptive about this process. Let me know if you have any questions.

 

Ted

Best,
Ted
Optimizely
vijayj 04-22-16
 

Re: Track view goal on iOS

Hi,

I am sorry that you are having issues with our View Goal. To create a view goal,  connect the iphone app and open up the editor. Tap on goals (the one with a flat on the top right). You can then create a saved goal. 

Tap on saved goal and select the 'view' goal type. In order for the editor to register the view, you will have interact with the app in your connected device.

 

That means either navigate to a different view in the app and come back you want and you will see the view being registered. 

 

See attached viewezgif.com-video-to-gif.gif

Level 1
icalo 04-25-16
 

Re: Track view goal on iOS

Thanks for the answers, I found the issue but I still do not have a solution.
On the editor the list of the view didn't appear because I disabled the swizzling method on the iOS SDK:

[Optimizely disableSwizzle];

Nevertheless, I cannot use the editor to configure my views, because in some case the "name" of the view depends on the context where this view is loaded.
I would like to be able to trigger a viewgoal manually, using something likeSmiley Indifferent

[Optimizely trackEventView:@"Edit profile page"];
Level 1
tedroddy 04-25-16
 

Re: Track view goal on iOS

icalo,

Disabling swizzling also disables the ability to track view goals and tap goals. You must rely on custom event goals with swizzling disabled. You can track a custom event like so:

[Optimizely trackEvent@"custom event name"];

You can trigger this goal when a view loads by placing that code in the viewDidLoad method of your view controller.

Ted
Best,
Ted
Optimizely