How can I set event attributes in a Realtime call to createLogEventRequest ?
R
Régis Cajet
started a topic
almost 6 years ago
Hi,
How can I set my event attributes when I call RTSession.newRequest().createLogEventRequest() in a Realtime script ?
I have tried to use the setScriptData function but it does not work. In the Unity GameSpark SDK there is a "SetEventAttribute" method but not in the back end.
Thanks
Best Answer
C
Customer Support
said
over 5 years ago
Hi Regis,
Apologies for the delayed response. You can check the example below for how to do this.
var request = RTSession.newRequest().createLogEventRequest();
request.setEventKey(...);
request.attributeShortCode (); //use the shortCode from the configured event.
request.setPlayerId(...);
request.send(function(response){
var scriptData = response.scriptData;
});
Apologies for the delayed response. You can check the example below for how to do this.
var request = RTSession.newRequest().createLogEventRequest();
request.setEventKey(...);
request.attributeShortCode (); //use the shortCode from the configured event.
request.setPlayerId(...);
request.send(function(response){
var scriptData = response.scriptData;
});
Regards,
Liam
I
Ian Waldrop
said
about 4 years ago
This is perhaps the least helpful response from a developer that I've ever seen.
Régis Cajet
Hi,
How can I set my event attributes when I call RTSession.newRequest().createLogEventRequest() in a Realtime script ?
I have tried to use the setScriptData function but it does not work. In the Unity GameSpark SDK there is a "SetEventAttribute" method but not in the back end.
Thanks
Hi Regis,
Apologies for the delayed response. You can check the example below for how to do this.
Regards,
Liam
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCustomer Support
Hi Regis,
Apologies for the delayed response. You can check the example below for how to do this.
Regards,
Liam
Ian Waldrop
This is perhaps the least helpful response from a developer that I've ever seen.
Chase Wilksch
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics