Creating new generic events
Overview¶
In Giosg Reporting we make use of different types of reporting events. One of those events is the most flexible and easiest to use for internal and external developers alike, this is the Generic Event. We have internal systems that apply aggregations over these events so these can be used to count, or average over a specific time when requested through Giosg APIs.
What does a generic event look like¶
In Giosg Reporting we have the a notion of generic event, this is an event that can be used for :
Name | Required | Type | Description |
---|---|---|---|
event_version | Yes | Int |
Event version |
vendor | Yes | String |
Vendor of event |
source | Yes | String |
Source of event, either "trusted" or "untrusted" |
category | Yes | String |
Event category |
label | Yes | String |
Event label |
action | Yes | String |
Event action |
organization_id | Yes | String |
Owner organization UUID |
properties | No | Array<String> |
List of string properties describing event |
dim1 | No | String |
Custom dimension |
dim2 | No | String |
Custom dimension |
dim3 | No | String |
Custom dimension |
dim4 | No | String |
Custom dimension |
dim5 | No | String |
Custom dimension |
visitor_id | No | String |
Giosg visitor identifier |
session_id | No | String |
Giosg visitor session identifier |
user_id | No | String |
Giosg user id (UUID) |
browser_name | No | String |
Visitor browser name |
browser_version | No | String |
Visitor browser version number |
device_screen_height | No | String |
Visitor screen height |
device_screen_width | No | String |
Visitor screen width |
device_type | No | String |
Visitor device type |
geo_city | No | String |
Visitor city |
geo_country | No | String |
Visitor country |
ip_organization | No | String |
Visitor company or name of the ISP |
os_name | No | String |
Visitor operating system |
os_version | No | String |
Visitor operating system version |
How can we send this generic event to giosg¶
We can use many of these fields in the generic event to fill in information that we might need in the future, or we want to use in giosg systems. Please keep in mind that not all of the above fields are required, you can mix and match the fields that you need. Below you will find two simple implementations in Python or JavaScript.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
Once the events are posted to giosg's systems we can go ahead and fetch data back from giosg's systems.
Request URL: POST https://service.giosg.com/api/events/v2/orgs/<organization_id>/fetch
Request body:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
Once you've executed it, you will get an aggregation of all metrics that have been sent by you!
Conclusion¶
When you have set up sending data to Giosg Reporting System, you can now use the generic reporting and the Conversational reporting. Enjoy your new reporting.
Endpoints used in this tutorial¶
https://api.giosg.com/events/v2/store/external
https://service.giosg.com/api/events/v2/orgs/<organization_id>/fetch