3

I want to send string parameters in Leanplum api using action script Eg 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 actual Request (App ID and ClientKey are dummy): https://www.leanplum.com/api?clientKey=V42fKaJaBuE&userId=1010&params={"Element":"Ur"}&appId=HEVdDlXiBVLwk&event=Element_Opened&action=track&versionName=2.3.0&apiVersion=1.0.6&info=Lu

Encoded Request: https://www.leanplum.com%2Fapi%3FclientKey%3DV42fKaJaBuE%26userId%3D1010%26params%3D%7B%22Element%22%3A%22Ur%22 %7D%26appId%3DHEVdDlXiBVLwk%26event%3DElement_Opened%26action%3Dtrack%26versionName%3D2.3.0%26apiVersion%3D1.0.6%26info%3DLu

if I run above request in any rest client I get the same status success : true .

I am getting the response {"response": [{"success": true}]} but I can't find the parameters with value string in Leanplum dashboard, its listing parameter name but not the String Value for parameter.

electronix384128
  • 6,625
  • 11
  • 45
  • 67
Irfan Gul
  • 1,579
  • 13
  • 23

1 Answers1

1

If you apply some combination of filters then you can see values of parameter you sent to leanplum. like First select the occurrence of some event then apply Group by parameter then select parameter you want to see the data for.

Its a little different from flurry, Google analytics etc.

enter image description here

Irfan Gul
  • 1,579
  • 13
  • 23