Analytics schema V4

Schema and Sample payloads for Analytics Events
Analytics are broadly classified into 4 types:
Page: Has context of the current page opened by the user. It can be a wallet, program, or any game.
Track: Has context of the user’s interaction, on the opened page. All interactions of users are grouped into track type.
State-Change: All state changes which happen on the server side are included in this category. Example: campaign completion, activity completion, etc.
System: Includes system level events like errors.

Page

{
"event_name": "PAGE_OPENED",
"type" : "page",
"event_id": "RGREFBupERuIh7m8XhN",
"user_id": "glu-test-user-dec-2-01",
"timestamp": "Mon, 05 Dec 2022 08:47:29 GMT",
"session_id": "yQy7tsuA4hZ6mNCKYU",
"session_time" : 5237,
"referrer": "string",
"analytics_version": "4.0.0",
"page_details":{
"page_layout": "FULL_PAGE",
"page_name": "SPIN_THE_WHEEL_GAME_PAGE"
},
"campaign_details":{
"campaign_id": "f0d2b40f-c69b-4851-ae2d-783f5c4aa850",
"campaign_name": "Challenge",
"campaign_experience": "SPIN_THE_WHEEL",
"reward_user_id": "00fc6dbf-7d69-4435-99ff-34b3d6112dba",
"campaign_state": "PRISTINE",
"reward_status": "REDEEMABLE-SEEN",
"selected_slot_index": 1,
"reward_type": "CUSTOM_REWARD",
"reward_title": "Discount 10%",
"reward_amount": 100,
"coupon_code": "TEST_COUPON_1"
},
"platform_details":{
"device_type": "MOBILE", "WEB",
"os": "CHROME", "SAFARI",
"agent_type": "WEB_VIEW",
"app_platform": "FLUTTER",
},
"optional_payload":{ "key1": "value1" }
}
FIELD
TYPE
DESCRIPTION
VALUES, (subject to change in case of updates)
event_name
string
PAGE_OPENED: When a page, sub-page, nudge page, or any custom page is opened
PAGE_OPENED
type
string
Type of event
page
event_id
string
Event Identification
unique string value
user_id
string
User Identification.
respective user id received from client app
timestamp
string
ISO UTC timestamp of the event.
time at event fired
session_id
string
user session id
Any unique string value
session_time
number
time spent by the user till this event
in milliseconds
referrer
string
source of the redirection, it’s an OPTIONAL PROPERTY
optional property
analytics_version
string
analytic version used for the respective campaigns
Any string value with semantic versioning
page_details
object
represents the current page details
page_layout
string
represents the type layout used for this page.
FULL_PAGE, BOTTOM_SHEET, POPUP
page_name
string
name of the page opened. subject to change in case of different pages are added to the campaigns
Any string value including but not limited to, SPIN_THE_WHEEL_GAME_PAGE, SLOT_MACHINE_GAME_PAGE, TOSS_THE_COIN_GAME_PAGE, ROLL_THE_DICE_GAME_PAGE, GIFT_BOX_GAME_PAGE, CATCHING_GAME_PAGE, SCRATCH_CARD_GAME_PAGE, QUIZ_1_PAGE, INTRO_PAGE, DIRECT_REWARD_PAGE, PERSONALITY_QUIZ_PAGE, CG_WALLET_PAGE, MULTISTEP, STREAK, ACTIVITY_CHALLENGE, GAME_CHALLENGE, REFERRAL
campaign_details
object
It’s an optional property. Available only for campaign-level ui’s.
optional
campaign_name
string
name of the campaign opened by the user
Any string value
campaign_experience
string
type of the campaign
Any string value including but not limited to, SPIN_THE_WHEEL, SCRATCHCARD, DIRECT_REWARD, SLOTMACHINE, MEMORY_GAME, QUIZ, GIFT_BOX, SWIPE_UI, PERSONALITY_QUIZ, TOSS_THE_COIN, ROLL_THE_DICE, REFERRAL ,MULTI_STEP, STREAK, GAME_CHALLENGE
reward_user_id
string
unique reward id of the user for the particular campaign
Any string value
campaign_state
string
user’s campaign state for the opened campaign
PRISTINE, IN_PROGRESS, COMPLETED
reward_status
string
user’s reward state for the opened campaign
REDEEMABLE-SEEN, REDEEMABLE-UNSEEN
selected_slot_index
number
index of the slot selected based on the probability
Any number starting from 0
reward_type
string
type of reward
Any string value, including but not limited to:
["NO_REWARD", "CUSTOM_REWARD", "COUPONS", "COINS", "POINTS", "CASHBACKS", "DIRECT"]
reward_title
string
title of reward
Any string value
reward_amount
number
numeric component of the reward
Any number
coupon_code
string
Coupon code (if eligible)
Any string value
platform_details
user platform details
device_type
string
user device type
MOBILE, WEB
os
string
operating system of the user
CHROME, ANDROID, IOS, MICROSOFT
agent_type
string
user agent of the ui
WEB_VIEW, BROWSER, IFRAME
app_platform
string
user app type
FLUTTER, ANDROID, IOS, WEB
optional_payload
object
any custom properties can be added, for better analytics
key and value pairs

Track- Frontend

{
"event_name": "COUPON_CODE_COPIED",
"type":"track",
"event_id": "EbZ1coFBupERuIh7m8XhN",
"user_id": "glu-test-user-dec-2-01",
"timestamp": "Mon, 05 Dec 2022 08:47:29 GMT",
"session_id": "ROyQy7tsuA4hZ6mNCKYU",
"session_time": 5237,
"referrer": "string",
"analytics_version": "4.0.0",
"page_details":{
"page_layout": "FULL_PAGE",
"page_name": "SPIN_THE_WHEEL_GAME_PAGE
},
"campaign_details":{
"campaign_id": "f0d2b40f-c69b-4851-ae2d-783f5c4aa850",
"campaign_name": "Challenge",
"campaign_experience": "SPIN_THE_WHEEL",
"reward_user_id": "00fc6dbf-7d69-4435-99ff-34b3d6112dba",
"campaign_state": "PRISTINE",
"reward_status": "REDEEMABLE-SEEN",
"selected_slot_index": 1,
"reward_type": "CUSTOM_REWARD",
"reward_title": "Discount 10%",
"reward_amount": 100,
"coupon_code": "TEST_COUPON_1"
},
"platform_details":{
"device_type": "MOBILE",
"os": "CHROME",
"agent_type": "WEB_VIEW",
"app_platform": "FLUTTER"
},
"interaction_details": {
"button_name": "string",
"properties": {
"code": "CODE_123",
"deep_link": "xyz/wallet/purchase",
"web_link": "https://xyz.com/test",
"channel": "string"
},
"quiz_details":{
"session_id": "jbkj77",
"question_index": 1,
"correct_answer": "answer 2",
"user_answer": "answer 2" ,
"is_correct": false
},
"survey_details":{
"survey_page_index":1
"all_fields":[
{
"field_type":"text_box",
"survey_question_index":1,
"question":"string",
"user_answers":["string"],
},
{
"field_type":"DOB",
"survey_question_index":"number",
"question":"string",
"user_answers":["string"],
},
{
"field_type":"check_box",
"survey_question_index":2,
"question":"string",
"user_answers":["string"],
},
{
"field_type":"drop_down",
"survey_question_index":3,
"question":"string",
"user_answers":["string"],
},
{
"field_type":"ratings",
"survey_question_index":4,
"question":"string",
"user_answers":["string"],
}
]
},
"optional_payload":{"keys": "values"},
}
FIELD
TYPE
DESCRIPTION
VALUES, (subject to change in case of updates)
event_name
string
user interaction event on the UI
Any string value including but not limited to:
"COUPON_CODE_COPIED"
"REWARD_CLAIMED"
"TRY_AGAIN_CLICKED"
"CAMPAIGN_BANNER_CLICKED"
"REFERRAL_LINK_COPIED"
"REFERRAL_CODE_COPIED"
"REWARD_CARD_CLICKED"
"VIEW_REWARD_CLICKED"
"QUIZ_QUESTION_SKIPPED"
"QUIZ_QUESTION_ANSWERED"
"CAMPAIGN_PLAY"
"BACK_BUTTON_CLICKED"
"BUTTON_CLICKED"
"VIEW_ALL"
"REMIND_CLICKED"
"CLOSE"
"GAME_PLAYED"
"ACTIVITY_CLICKED"
"CLOSE_CLICKED"
"SURVEY_ANSWERED"
"TIME_OVER"
type
string
Type of event
track
event_id
string
Event Identification
unique string value
user_id
string
User Identification.
respective user id received from client app
timestamp
string
ISO UTC timestamp of the event.
time at which event triggered
session_id
string
user session id
Any unique string value
session_time
number
time spent by the user till this event
in milliseconds
referrer
string
source of the redirection
Any string value
analytics_version
string
analytic version used for the respective campaigns
Any string value with semantic versioning
page_details
object
represents the current page details
page_layout
string
represents the type layout used for this page.
FULL_PAGE, BOTTOM_SHEET, POPUP
page_name
string
name of the page opened. subject to change in case of different pages are added to the campaigns
Any string value including but not limited to, SPIN_THE_WHEEL_GAME_PAGE, SLOT_MACHINE_GAME_PAGE, TOSS_THE_COIN_GAME_PAGE, ROLL_THE_DICE_GAME_PAGE, GIFT_BOX_GAME_PAGE, CATCHING_GAME_PAGE, SCRATCH_CARD_GAME_PAGE, QUIZ_1_PAGE, INTRO_PAGE, DIRECT_REWARD_PAGE, PERSONALITY_QUIZ_PAGE, CG_WALLET_PAGE, MULTISTEP, STREAK, ACTIVITY_CHALLENGE, GAME_CHALLENGE, REFERRAL
campaign_details
object
It’s an optional property. Available only for campaign-level interactions.
optional
campaign_name
string
name of the campaign opened by the user
Any string value
campaign_experience
string
type of the campaign
Any string value including but not limited to, SPIN_THE_WHEEL, SCRATCHCARD, DIRECT_REWARD, SLOTMACHINE, MEMORY_GAME, QUIZ, GIFT_BOX, SWIPE_UI, PERSONALITY_QUIZ, TOSS_THE_COIN, ROLL_THE_DICE, REFERRAL ,MULTI_STEP, STREAK, GAME_CHALLENGE
reward_user_id
string
unique reward id of the user for the particular campaign
Any string value
campaign_state
string
user’s campaign state for the opened campaign
PRISTINE, IN_PROGRESS, COMPLETED
reward_status
string
user’s reward state for the opened campaign
REDEEMABLE-SEEN, REDEEMABLE-UNSEEN
selected_slot_index
number
Selected slot index based on the probability
Any number starting from 0
reward_type
string
Type of the reward
Any string value, including but not limited to:
["NO_REWARD", "CUSTOM_REWARD", "COUPONS", "COINS", "POINTS", "CASHBACKS", "DIRECT"]
reward_title
string
Title of the reward
Any string value
reward_amount
number
Numeric component of the reward
Any number
coupon_code
string
Coupon code (if eligible)
Any string value
platform_details
object
user platform details
device_type
string
user device type
MOBILE, WEB
os
string
the operating system of the user
CHROME, ANDROID, IOS, MICROSOFT
agent_type
string
user agent of the ui
WEB_VIEW, BROWSER, IFRAME
app_platform
string
user app type
FLUTTER, ANDROID, IOS, WEB
optional_payload
object
any custom properties can be added, for better analytics
It’s an optional payload
interaction_details
object
user interaction (click) details
It’s an optional object, sub-properties depend on the event_name
button_name
string
button name of this click event
name of the button
code
string
code copied by user
Any string value
deep_link
string
deeplink opened by user
Any string value
web_link
string
web link opened by user
Any string value
channel
string
share channel
WHATSAPP, etc
session_id
string
unique quiz session id
Any string value
question_index
number
question id of the current user
number
user_answer
string
user answer for the question
Any string value
user_answers
array
in case of multiple answers (surveys)
Array of strings
correct_answer
string
correct answer for the question
Any string value
is_correct
boolean
user answer state
true, false
survey_page_index
number
current survey page id
number
field_type
string
current question type
TEXT_INPUT, CHECK_BOX, DROP_DOWN, RATINGS
survey_question_index
number
current survey question id
number
question
string
survey question
Any string value

Track-SDK

Webview Load

{
"analytics_version":"4.1.0",
"type":"track",
"event_name":"WEBVIEW_LOAD",
"event_id":"018a34b1-71bb-4022-b410-cd0b015f136d",
"user_id":"string",
"timestamp":"2022-09-05T07:27:25.852Z",
"webview_content":{
"webview_url":"xyz.com",
"webview_layout":"FULLSCREEN",
"absolute_height":"",
"relative_height":""
},
"platform_details":{
"device_type":"MOBILE",
"os":"CHROME",
"app_platform":"FLUTTER",
"sdk_version":"v1.0.9"
}
}
FIELD
TYPE
DESCRIPTION
VALUES
event_name
string(enum)
Name of a particular event.
WEBVIEW_LOAD
type
string
event type
track
event_id
string
Unique event Id
Any String Value
user_id
string
User Identification.
Any String Value
analytics_version
string
Version of analytics event
"4.0.0"
timestamp
string
UTC timestamp of the event
Any String Value
device_type
string
Mobile or Web as the device type
"MOBILE", "WEB"
os
string
Client platform where the SDK is consumer
"CHROME", "SAFARI", "MOZILLA", "ANDROID", "IOS"
app_platform
string
SDK development platform / framework / plugin used
"FLUTTER", "ANDROID", "REACT_NATIVE", "IOS", "WEB"
sdk_version
string
SDK version
Any String Value
webview_url
string
The website url which is loaded in the webview
Any String Value
webview_layout
string
The webview layout configuration
middle-default
absolute_height
string
Webview’s absolute height
Any String Value (Numbers Only)
relative_height
string
Webview's height in percentage
Any String Value (Numbers Only between 1- 100)

Webview Dismiss

{
"analytics_version":"4.1.0",
"event_name":"WEBVIEW_DISMISS",
"type":"track",
"event_id":"018a34b1-71bb-4022-b410-cd0b015f136d",
"user_id":"string",
"timestamp":"2022-09-05T07:27:25.852Z",
"dismiss_trigger":"PHYSICAL_BUTTON",
"webview_content":{
"webview_url":"xyz.com",
"webview_layout":"FULLSCREEN",
"absolute_height":"",
"relative_height":""
},
"platform_details":{
"device_type":"MOBILE",
"os":"CHROME",
"app_platform":"FLUTTER",
"sdk_version":"v1.0.9"
}
}
FIELD
TYPE
DESCRIPTION
VALUES
event_name
string(enum)
Name of a particular event.
WEBVIEW_DISMISS
type
string
Event type
track
event_id
string
Unique event Id
Any String Value
user_id
string
User Identification.
Any String Value
analytics_version
string
Version of analytics event
"4.0.0"
timestamp
string
UTC timestamp of the event
Any String Value
device_type
string
Mobile or Web as the device type
"MOBILE", "WEB"
os
string
Client platform where the SDK is consumer
"CHROME", "SAFARI", "MOZILLA", "ANDROID", "IOS"
app_platform
string
SDK development platform / framework / plugin used
"FLUTTER", "ANDROID", "REACT_NATIVE", "IOS", "WEB"
sdk_version
string
SDK version
Any String Value
dismiss_trigger
sting
Dismiss Mechanism for the Nudge
PHYSICAL_BUTTON
webview_url
string
The website url which is loaded in the webview
Any String Value
webview_layout
string
The webview layout configuration
middle-default
absolute_height
string
Webview’s absolute height
Any String Value (Numbers Only)
relative_height
string
Webview's height in percentage
Any String Value (Numbers Only between 1- 100)

Notification Load (only triggered if the app is in foreground)

{
"analytics_version":"4.1.0",
"event_name":"NOTIFICATION_LOAD",
"type":"track",
"event_id":"018a34b1-71bb-4022-b410-cd0b015f136d",
"user_id":"string",
"timestamp":"2022-09-05T07:27:25.852Z",
"platform_details":{
"device_type":"MOBILE",
"os":"CHROME",
"app_platform":"FLUTTER",
"sdk_version":"v1.0.9"
},
"nudge":{
"nudge_id":"",
"type":"push",
"campaign_id":"",
"title":"",
"body":"",
"nudge_layout":"",
"click_action":""
}
}
FIELD
TYPE
DESCRIPTION
VALUES
event_name
string(enum)
Name of a particular event.
NOTIFICATION_LOAD
type
string
Event type
track
event_id
string
Unique event Id
Any String Value
user_id
string
User Identification.
Any String Value
analytics_version
string
Version of analytics event
"4.0.0"
timestamp
string
UTC timestamp of the event
Any String Value
device_type
string
Mobile or Web as the device type
"MOBILE", "WEB"
os
string
Client platform where the SDK is consumer
"CHROME", "SAFARI", "MOZILLA", "ANDROID", "IOS"
app_platform
string
SDK development platform / framework / plugin used
"FLUTTER", "ANDROID", "REACT_NATIVE", "IOS", "WEB"
sdk_version
string
SDK version
Any String Value
nudge_id
string
Unique nudge identifier
Any String Value
type
string
Nudge type constant
push
campaign_id
string
Unique Campaign identifier (optional)
Any String Value
title
string
Nudge Notification Title
Any String Value
body
string
Nudge Notification Body
Any String Value
click_action
string
Nudge Notification Load URL
Any String Value
nudge_layout
string
Represent nudge open layout
middle-default

Push Notification Clicked

{
"event_name":"PUSH_NOTIFICATION_CLICK",
"type":"track",
"event_id":"018a34b1-71bb-4022-b410-cd0b015f136d",
"user_id":"string",
"timestamp":"2022-09-05T07:27:25.852Z",
"platform_details":{
"device_type":"MOBILE",
"os":"IOS",
"app_platform":"FLUTTER",
"sdk_version":"v1.0.9"
},
"nudge":{
"nudge_id":"",
"type":"push",
"campaign_id":"",
"title":"",
"body":"",
"click_action":""
}
}
FIELD
TYPE
DESCRIPTION
VALUES
event_name
string(enum)
Name of a particular event.
PUSH_NOTIFICATION_CLICK
type
string
Event type
track
event_id
string
Unique event Id
Any String Value
user_id
string
User Identification.