2 Replies Latest reply: Jul 11, 2012 12:14 AM by Ulrik Sandholt RSS

Setting Custom Parameters for iOS

Ulrik Sandholt Newbie

Hi Guys,

 

I have a simple question. If I want to send the following Webtrends Parameters and Custom Parameters from my iOS apps, which would be the correct way of doing it: WT.seg_1=test and DCSext.category=Test2

 

V1

[e setValue:@"Test" forCustomParameter:@"WT.seg_1"];

[e setValue:@"Test2" forCustomParameter:@"category"];

 

OR

V2

[e setValue:@"Test" forParameter:@"WT.seg_1"];

[e setValue:@"Test2" forCustomParameter:@"DCSext.category"];

 

OR

V3

[e setValue:@"Test" forCustomParameter:@"WT.seg_1"];

[e setValue:@"Test2" forCustomParameter:@"DCSext.category"];

 

 

Or would it be something entirely different?

 

I am of course also firing off code for the event that is not custom:

 

WTEvent * e = [WTEvent eventForScreenView:[NSString stringWithFormat:@"/showcases/slideshows/%@/%@", s.category.name, s.name]

eventDescr:@"Showcase Overview"

eventType:@"view"

 

But I am confused if WT.parameter should use forParameter or forcustomParameter and if Custom parameters should use DCSext. or not.

 

Let me know what you think! And thanks for the help.

 

Kind regards

Ulrik

  • Setting Custom Parameters for iOS
    James Nicholas Newbie

    Hi Ulrik,

     

    You would not use DCSext. when passing a custom parameter. The parameters you pass are exactly what will be sent when the SDK fires off an event. So, you will still append WT. parameters with WT. - such as WT.ti for title - but you wouldn't prepend DCS. to the SDC-parameter override parameters such as dcsaut and you wouldn't prepend DCSExt. to any custom parameters.

     

    In your above example, the correct syntax would be:

     

    [e setValue:@"Test" forCustomParameter:@"WT.seg_1"];

    [e setValue:@"Test2" forCustomParameter:@"category"];

     

    Thanks,

     

    James

    • Re: Setting Custom Parameters for iOS
      Ulrik Sandholt Newbie

      Thanks James,

       

      I fortunately did it, they way you described.

       

      I have trouble getting custom parameters into Webtrends and the standard stuff like screens views etc, being set with eventForScreenView and eventDescr works fine.

       

      It is very odd, I will have to check the logfiles to see if data is actually there.

      I will get back with more info

       

      Code example:

       

      appcodesample.png

      Do you see anything wrong here?

      I can see that autorelease] is missing (compared to the documentation), would that cause the next code not to be fired off?