Sending string parameter to action = track leanplum Rest Api not working

I want to send string parameters to Leanplum api using a script action For example param: {"Element": "Hi"}

var request:URLRequest = new URLRequest("https://www.leanplum.com/api");
request.method = URLRequestMethod.GET;

var variables:URLVariables = urlVariables;
variables.userId = userId;      
variables.event = eventName;
var params:Object = new Object();
params.Element = "Hi";
var paramStr:String = JSON.stringify(params);
variables.params = paramStr;
variables.appId = appId;
variables.clientKey = clientKeyProduction;
variables.apiVersion = apiVersion;
variables.action = "track";
variables.versionName = AppInfo.getInstance().appVersion;
request.data = variables;
var loader:URLLoader = new URLLoader();

loader.addEventListener(Event.COMPLETE, function(e:Event):void {
                trace(e.target.data);
            });

loader.addEventListener(IOErrorEvent.IO_ERROR, function(e:IOErrorEvent):void {
                trace(e.target.data);
            });

loader.load(request);

      

This is the actual request (Application ID and ClientKey are bogus): https://www.leanplum.com/api?clientKey=V42fKaJaBuE&userId=1010ΒΆms= {"Item": "Ur"} & app = id; apiVersion = 1.0.6 & Info = Lou

Coded request: https: //www.leanplum.com%2Fapi%3FclientKey%3DV42fKaJaBuE%26userId%3D1010%26params%3D%7B%22Element%22%3A%22Ur%22% 7D% 26appId% 3DHEVLDlXiaction% 26appId% 3DHEVLDlXiaction% % 3Dtrack% 26versionName% 3D2.3.0% 26apiVersion% 3D1.0.6% 26info% 3DLu

if i execute the request above in any rest client i get the same success status: true.

I get a response {"response": [{"success": true}]}, but I can't find the parameters with a value string in the Leanplum toolbar, its the list parameter name but not the String Value parameter for the parameter.

+3


source to share


1 answer


If you apply some combination of filters, you can see the values ​​of the parameter you sent to leanplum. For example, first select the occurrence of an event, then apply the Group By Parameter option, then select the parameter you want to see for the data.

This is a little different from Flurry, Google Analytics, etc.



enter image description here

+1


source







All Articles