The Real-time data can be sent to Gamooga through Server-Server integration.
1. Company Information API
The following HTTP API for getting the backend server of the specified company.
https://cdn-jp.gsecondscreen.com/newnaconf/<company id>/
a. The above link will generate a JSON
b. The generated JSON contains a key ‘evbk’ which holds the name of the server where the events of the specified company get stored.
Note: The ‘evbk’ does not change often and is mostly fixed.
Events and Visitor Properties can be sent to Gamooga from client’s server using the following API
2. Event API (with unique id):
Event push can occur by utilizing the unique identifier (such as user_id or customer_id). For the aforementioned, evwid or evwidj calls are to be used. These are GET and POST request respectively. These calls first identify the users on the unique identifier fetching the visitor id from Gamooga’s backend and then push the event to Gamooga mapped with the fetched visitor ids.
GET request API.
https://evbk.gamooga.com/evwid/?c=<company id>&u=<unique id>&e=<event name>&
ky=<property name 1>&vl=<property value 1>&tp=<property datatype 1>&
ky=<property name 2>&vl=<property value 2>&tp=<property datatype 2>&tm=<epoch>
POST request API.
https://evbk.gamooga.com/evwidj/?c=<company id>&u=<unique id>&e=<event name>&tm=<epoch>
Body is to be sent as follows
{“ky”:”vl”,”ky”:”vl”,”ky”:”vl”}
:- “epoch(tm)”- The tm parameter takes values in Unix time in milliseconds.If the tm parameter is not specified, the event will be stored at the current time (time while calling the API).
:- “Company id(c)”- company id (which can be found in account section)
:- “Unique id(u)”- Unique identifier of the visitor.
:- “Event Name(e)”- Event name to be used in the campaign. An event can have multiple property sets.
:- “Property Set (ky, vl, tp)”- Each property set defines a single property of an event. And multiple sets can be added as shown above.’ky’ being the name of the property, ‘vl’ being the property value and ‘tp’ being the datatype of the property. The acceptable datatypes are string(s), numeric(n) and boolean(b).
:- “Response”- Response status 200 means a successful event push.
Note:The parameter ‘tp’ is not present in the POST request
3. Event API (with visitor id):
Event push can also be done by utilizing the visitor id using the ev call. This call directly pushes the event to Gamooga using the visitor id that is passed in as the parameter “v” in the API request.
https://evbk.gamooga.com/ev/?c=<company id>&v=<visitorid>&e=<eventname>&ky=<property name 1>&vl=<property value 1>&tp=<property datatype 1>&
ky=<property name 2>&vl=<property value 2>&tp=<property datatype 2>&tm=<epoch>
:- “epoch(tm)”- The tm parameter takes values in Unix time in milliseconds.If the tm parameter is not specified, the event will be stored at the current time (time while calling the API).
:- “Company id(c)”- company id (which can be found in account section)
:- “Visitor id(v)”- Visior id assigned to the user on the website/app.
:- “Event Name(e)”- Event name to be used in the campaign. An event can have multiple property sets.
:- “Property Set (ky, vl, tp)”- Each property set defines a single property of an event. And multiple sets can be added as shown above.’ky’ being the name of the property, ‘vl’ being the property value and ‘tp’ being the datatype of the property. The acceptable datatypes are string(s), numeric(n) and boolean(b).
:- “Response”- Response status 200 means a successful event push.
4. Event & Visitor Property API:
The evvprwid call is used to identify the user based on the unique identifier by fetching the visitor id from the backend that is passed and pushes both events and visitor properties through a single API call.
https://evbk.gamooga.com/evvprwid/?e=<eventname>&c=<company id>&u=<uniqueid>&eky=<event property name 1>&evl=<event property value 1>&etp=<event property datatype 1>&vky=<visitor property name 1>&vvl=<visitor property value 1>&vtp=<visitor property datatype 1>&tm=<epoch>
:- “epoch(tm)”- The tm parameter takes values in Unix time in milliseconds.If the tm parameter is not specified, the event will be stored at the current time (time while calling the API).
:- “Company id(c)”- company id (which can be found in account section)
:- “Visitor id(v)”- Visior id assigned to the user on the website/app.
:- “Event Name(e)”- Event name to be used in the campaign. An event can have multiple property sets.
:- “Event Property Set (eky, evl, etp)”- Each property set defines a single property of an event. And multiple sets can be added as shown above.’ky’ being the name of the event property, ‘vl’ being the property value and ‘tp’ being the datatype of the property. The acceptable datatypes are string(s), numeric(n) and boolean(b).
:- “Visitor property set (vky, vvl, vtp)”- Each property set defines a single property of an visitor. And multiple sets can be added as shown above. ‘vky’ being the name of the visitor property, ‘vvl’ being the visitor property value and ‘tp’ being the datatype of the visitor property. The acceptable datatypes are string(s), numeric(n) and boolean(b).
:- “Response”- Response status 200 means a successful event push.
5. Visitor Property Push API:
Visitor properties can be pushed for a visitor id to Gamooga by utilizing the below API call.
https://evbk.gamooga.com/vpr/?c=<company id>&v=<visitor id>&p=<property Name 1>&vl=<property value 1>&tp=<property datatype 1>&p=<property Name 2>&vl=<property value 2>&tp=<property datatype 2>
:- “Company id(c)”- company id (which can be found in account section)
:- “Visitor id(v)”- Visior id assigned to the user on the website/app.
:- “Property Set (p, vl, tp)”- Each property set defines a single property of an event. And multiple sets can be added as shown above.’p’ being the name of the property, ‘vl’ being the property value and ‘tp’ being the datatype of the property. The acceptable datatypes are string(s), numeric(n) and boolean(b).
:- “Response”- Response status 200 means a successful event push.
More Event Properties or Visitor Properties can be added in a similar manner to respective API.
6. Visitor ID fetch/ Identification API call:
“id” call can be used for the below scenarios:
-If the unique identifier and the visitor id are passed in the “id” API call both these parameters will be mapped to each other in Gamooga Backend.
https://evbk.gamooga.com/id/?c=<company id>&u=<unique id>
-If only the unique identifier is passed in the “id” API call , the visitor id that is mapped to the unique identifier will be fetched from Gamooga’s backend. If there is no visitor id mapped to the unique identifier, a fresh visitor id will be created that is mapped to the unique identifier that is passed in the API call.
https://evbk.gamooga.com/id/?c=<company id>&u=<unique id>&v=<visitor id>
:- “Company id(c)”- company id (which can be found in account section)
:- “Unique id(u)”- Unique identifier of the visitor.
:- “Visitor id(v)”- Visior id assigned to the user on the website/app.
Note:
- If the campaigns used by the client majorly involve real-time data flow from the website, it is recommended to use GTM to send events.
- If GTM Integration is not preferred, then send the events through Server-Server API. However, there will be limitations under campaign level where it is hard to debug compared to the GTM Approach.
- If the campaigns are based on data being pushed in batch(once in a day, etc.) then bulk imports and DB queries are preferred over Server - Server API.