I have started to hookup basic analytics for our game and my thought was start basic and work my way up from there so here is a snippet that records a key/value pair:
public void RecordAnalytic(string key, string value)
{
GSRequestData data = new GSRequestData();
data.AddString("value", value);
new AnalyticsRequest()
.SetKey(key)
.SetData(data)
.Send((response =>
{
if(!response.HasErrors)
{
Debug.Log(string.Format("Analytic Recorded - Key:{0} Value:{1}", key, value));
}
else
{
Debug.Log(string.Format("Failed Recording Analytic - Key:{0} Value:{1}", key, value));
}
}));
}
It looks like it recorded it as here is my Request/Response:
Looked at the NoSQL and Analytics interface for about 30 minutes trying to find a way to get this data back out and I seem to be at a loss. Full disclosure, I have a relational database background so NoSQL concepts are a bit new to me, but what is the best way to get this up on my custom analytics dashboard and query it in the NoSQL interface?
Bonus Question:
Would it be easier/more efficient to send all of the data in one GSRequestData JSON object that I wanted to record at once instead of sending key/value pairs one at a time?
Best Answer
C
Customer Support
said
about 7 years ago
Im going to copy in an answer from a ticket i received recently describing how to access this data...
So that additional data is not directly accessible through NoSQL. You will need to build a custom chart to view it.
You can see that charts tab to the right of 'Screens' and 'Snippets' tab...
When you go to edit the code of the chart you will get some query
options instead of the fields for html and javascrip you would get from a
normal snippet. If you select @type you will see your available
analytics keys to the right.
Then click on the 'filter' button and you should see your data options available...
You can customize your chart and hit 'Test' so see the data for that key...
In my case ive only got one element with a count of 1, so i'll do
more tests so i can show you more data tomorrow, but this should get you
going.
Have you tried testing the Analytics in the test harness. Generally they should update every 10 minutes. So if you can try it in the test harness when you get a chance and see if it works from there we can see if the fault lies with the system or with the code.
Let me know how you get on, Jamie.
M
Matt Munson
said
about 8 years ago
So I tried using just the Test Harness with pretty much the same results. Here was my request in JSON:
Waited 10 minutes and didn't see anything in my custom analytics nor was I able to find anything in the NoSQL database. I'm probably just missing some concept here. Any help would be appreciated!
Thanks,
Matt
Customer Support
said
about 8 years ago
Hey Matt,
If you click the dashboard in Analytics you can create a chart configuration for your game which defines how it shows in the custom tab.
If you create one it should start to show up in the custom tab pretty much straight away now.
Edit: Just make sure to choose custom analytic from the type drop down. Jamie
M
Matt Munson
said
about 8 years ago
This is what I see:
Where would I go from here to create a chart configuration?
Also, is there a way to query it in the NoSQL interface?
Thanks Jamie!
Matt
L
Lukasz Borun
said
about 8 years ago
Bump!
Matt, did you resolved this problem?
M
Matt Munson
said
about 8 years ago
Lukasz,
I have it recording the analytics now, but for some reason the string value that I'm passing in is not saving. I have attached the NoSQL query in a screenshot:
Thoughts?
Matt
Customer Support
said
about 7 years ago
Answer
Im going to copy in an answer from a ticket i received recently describing how to access this data...
So that additional data is not directly accessible through NoSQL. You will need to build a custom chart to view it.
You can see that charts tab to the right of 'Screens' and 'Snippets' tab...
When you go to edit the code of the chart you will get some query
options instead of the fields for html and javascrip you would get from a
normal snippet. If you select @type you will see your available
analytics keys to the right.
Then click on the 'filter' button and you should see your data options available...
You can customize your chart and hit 'Test' so see the data for that key...
In my case ive only got one element with a count of 1, so i'll do
more tests so i can show you more data tomorrow, but this should get you
going.
Let me know if that works
Sean
E
Esteban Feldman
said
almost 5 years ago
Hi, What if I don't want the count of requests but the value of the data I'm sending?
Matt Munson
I have started to hookup basic analytics for our game and my thought was start basic and work my way up from there so here is a snippet that records a key/value pair:
It looks like it recorded it as here is my Request/Response:
GS: SEND:{"@class":".AnalyticsRequest","key":"MovesUsed","data":{"value":"26"},"requestId":"635540848857508858_150"}
GS: RECV:{"@class":".AnalyticsResponse","requestId":"635540848857508858_150","scriptData":null}
Looked at the NoSQL and Analytics interface for about 30 minutes trying to find a way to get this data back out and I seem to be at a loss. Full disclosure, I have a relational database background so NoSQL concepts are a bit new to me, but what is the best way to get this up on my custom analytics dashboard and query it in the NoSQL interface?
Bonus Question:
Would it be easier/more efficient to send all of the data in one GSRequestData JSON object that I wanted to record at once instead of sending key/value pairs one at a time?
Im going to copy in an answer from a ticket i received recently describing how to access this data...
So that additional data is not directly accessible through NoSQL.
You will need to build a custom chart to view it.
You can see that charts tab to the right of 'Screens' and 'Snippets' tab...
When you go to edit the code of the chart you will get some query options instead of the fields for html and javascrip you would get from a normal snippet. If you select @type you will see your available analytics keys to the right.
Then click on the 'filter' button and you should see your data options available...
You can customize your chart and hit 'Test' so see the data for that key...
In my case ive only got one element with a count of 1, so i'll do more tests so i can show you more data tomorrow, but this should get you going.
Let me know if that works
Sean
2 people have this question
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCustomer Support
Have you tried testing the Analytics in the test harness. Generally they should update every 10 minutes. So if you can try it in the test harness when you get a chance and see if it works from there we can see if the fault lies with the system or with the code.
Let me know how you get on,
Jamie.
Matt Munson
So I tried using just the Test Harness with pretty much the same results. Here was my request in JSON:
And here is my test harness response back:
Waited 10 minutes and didn't see anything in my custom analytics nor was I able to find anything in the NoSQL database. I'm probably just missing some concept here. Any help would be appreciated!
Thanks,
Matt
Customer Support
If you click the dashboard in Analytics you can create a chart configuration for your game which defines how it shows in the custom tab.
If you create one it should start to show up in the custom tab pretty much straight away now.
Edit: Just make sure to choose custom analytic from the type drop down.
Jamie
Matt Munson
This is what I see:
Where would I go from here to create a chart configuration?
Also, is there a way to query it in the NoSQL interface?
Thanks Jamie!
Matt
Lukasz Borun
Bump!
Matt, did you resolved this problem?
Matt Munson
Lukasz,
I have it recording the analytics now, but for some reason the string value that I'm passing in is not saving. I have attached the NoSQL query in a screenshot:
Thoughts?
Matt
Customer Support
Im going to copy in an answer from a ticket i received recently describing how to access this data...
So that additional data is not directly accessible through NoSQL.
You will need to build a custom chart to view it.
You can see that charts tab to the right of 'Screens' and 'Snippets' tab...
When you go to edit the code of the chart you will get some query options instead of the fields for html and javascrip you would get from a normal snippet. If you select @type you will see your available analytics keys to the right.
Then click on the 'filter' button and you should see your data options available...
You can customize your chart and hit 'Test' so see the data for that key...
In my case ive only got one element with a count of 1, so i'll do more tests so i can show you more data tomorrow, but this should get you going.
Let me know if that works
Sean
Esteban Feldman
1 person likes this
-
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