Skip to content

Add/ga4 schemas #1387

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jun 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
09f198b
Add com.google.tag-manager.server-side/add_shipping_info/jsonschema/1…
adatzer Feb 13, 2024
96f44bf
Add com.google.tag-manager.server-side/earn_virtual_currency/jsonsche…
adatzer Feb 13, 2024
724a01a
Add com.google.tag-manager.server-side/level_end/jsonschema/1-0-0 (cl…
adatzer Feb 13, 2024
87bae11
Add com.google.tag-manager.server-side/level_start/jsonschema/1-0-0 (…
adatzer Feb 13, 2024
4c09ed7
Add com.google.tag-manager.server-side/level_up/jsonschema/1-0-0 (clo…
adatzer Feb 13, 2024
20e3bd1
Add com.google.tag-manager.server-side/post_score/jsonschema/1-0-0 (c…
adatzer Feb 13, 2024
b867d61
Add com.google.tag-manager.server-side/remove_from_cart/jsonschema/1-…
adatzer Feb 13, 2024
4147773
Add com.google.tag-manager.server-side/select_item/jsonschema/1-0-0 (…
adatzer Feb 13, 2024
6b9b490
Add com.google.tag-manager.server-side/select_promotion/jsonschema/1-…
adatzer Feb 13, 2024
1b38f7b
Add com.google.tag-manager.server-side/spend_virtual_currency/jsonsch…
adatzer Feb 13, 2024
bf90027
Add com.google.tag-manager.server-side/tutorial_begin/jsonschema/1-0-…
adatzer Feb 13, 2024
673c034
Add com.google.tag-manager.server-side/tutorial_complete/jsonschema/1…
adatzer Feb 13, 2024
20dd65d
Add com.google.tag-manager.server-side/unlock_achievement/jsonschema/…
adatzer Feb 13, 2024
15de435
Add com.google.tag-manager.server-side/view_cart/jsonschema/1-0-0 (cl…
adatzer Feb 13, 2024
ddf153f
Add com.google.tag-manager.server-side/view_promotion/jsonschema/1-0-…
adatzer Feb 13, 2024
c6a4821
Prepare for R167 release
istreeter Jun 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
Release 167 (2025-06-12)
------------------------
Add com.google.tag-manager.server-side/view_promotion/jsonschema/1-0-0 (#1386)
Add com.google.tag-manager.server-side/view_cart/jsonschema/1-0-0 (#1385)
Add com.google.tag-manager.server-side/unlock_achievement/jsonschema/1-0-0 (#1384)
Add com.google.tag-manager.server-side/tutorial_complete/jsonschema/1-0-0 (#1383)
Add com.google.tag-manager.server-side/tutorial_begin/jsonschema/1-0-0 (#1382)
Add com.google.tag-manager.server-side/spend_virtual_currency/jsonschema/1-0-0 (#1381)
Add com.google.tag-manager.server-side/select_promotion/jsonschema/1-0-0 (#1380)
Add com.google.tag-manager.server-side/select_item/jsonschema/1-0-0 (#1379)
Add com.google.tag-manager.server-side/remove_from_cart/jsonschema/1-0-0 (#1378)
Add com.google.tag-manager.server-side/post_score/jsonschema/1-0-0 (#1377)
Add com.google.tag-manager.server-side/level_up/jsonschema/1-0-0 (#1376)
Add com.google.tag-manager.server-side/level_start/jsonschema/1-0-0 (#1375)
Add com.google.tag-manager.server-side/level_end/jsonschema/1-0-0 (#1374)
Add com.google.tag-manager.server-side/earn_virtual_currency/jsonschema/1-0-0 (#1373)
Add com.google.tag-manager.server-side/add_shipping_info/jsonschema/1-0-0 (#1372)

Release 166 (2025-04-28)
------------------------
Add com.snowplowanalytics.snowplow/obscure_element/jsonschema/1-0-0
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
{
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"self": {
"vendor": "com.google.tag-manager.server-side",
"name": "add_shipping_info",
"version": "1-0-0",
"format": "jsonschema"
},
"description": "This event signifies a user has submitted their shipping information.",
"type": "object",
"properties": {
"currency": {
"description": "Currency of the items associated with the event, in 3-letter ISO 4217 format. Is required, if value is set.",
"type": ["string", "null"],
"minLength": 3,
"maxLength": 3
},
"value": {
"description": "The monetary value of the event.",
"type": ["number", "null"],
"minimum": 0,
"multipleOf": 0.001
},
"coupon": {
"description": "The coupon name or code associated with the event.",
"type": ["string", "null"],
"maxLength": 4096
},
"shipping_tier": {
"description": "The shipping tier (e.g. Ground, Air, Next-day) selected for delivery of the purchased item.",
"type": ["string", "null"],
"maxLength": 4096
},
"items": {
"description": "The items for the event.",
"type": "array",
"items": {
"description": "An item object.",
"type": "object",
"properties": {
"item_id": {
"description": "The ID of the item.",
"type": ["string", "null"],
"maxLength": 500
},
"item_name": {
"description": "The name of the item.",
"type": ["string", "null"],
"maxLength": 500
},
"affiliation": {
"description": "A product affiliation to designate a supplying company or brick and mortar store location",
"type": ["string", "null"],
"maxLength": 4096
},
"coupon": {
"description": "The coupon name or code associated with the item.",
"type": ["string", "null"],
"maxLength": 4096
},
"currency": {
"description": "The currency, in 3-letter ISO 4217 format.",
"type": ["string", "null"],
"minLength": 3,
"maxLength": 3
},
"discount": {
"description": "The monetary discount value associated with the item.",
"type": ["number", "null"],
"minimum": 0,
"multipleOf": 0.001
},
"index": {
"description": "The index of the item in a list.",
"type": ["integer", "null"],
"minimum": 0
},
"item_brand": {
"description": "The brand of the item.",
"type": ["string", "null"],
"maxLength": 4096
},
"item_category": {
"description": "The category of the item.",
"type": ["string", "null"],
"maxLength": 4096
},
"item_category2": {
"description": "The second category hierarchy or additional taxonomy for the item.",
"type": ["string", "null"],
"maxLength": 4096
},
"item_category3": {
"description": "The third category hierarchy or additional taxonomy for the item.",
"type": ["string", "null"],
"maxLength": 4096
},
"item_category4": {
"description": "The fourth category hierarchy or additional taxonomy for the item.",
"type": ["string", "null"],
"maxLength": 4096
},
"item_category5": {
"description": "The fifth category hierarchy or additional taxonomy for the item.",
"type": ["string", "null"],
"maxLength": 4096
},
"item_list_id": {
"description": "The ID of the list in which the item was presented to the user.",
"type": ["string", "null"],
"maxLength": 4096
},
"item_list_name": {
"description": "The name of the list in which the item was presented to the user.",
"type": ["string", "null"],
"maxLength": 4096
},
"item_variant": {
"description": "The item variant or unique code or description for additional item details or options.",
"type": ["string", "null"],
"maxLength": 4096
},
"location_id": {
"description": "The location associated with the item.",
"type": ["string", "null"],
"maxLength": 4096
},
"price": {
"description": "The monetary price of the item, in units of the specified currency parameter.",
"type": ["number", "null"],
"minimum": 0,
"multipleOf": 0.001
},
"quantity": {
"description": "Item quantity.",
"type": ["integer", "null"],
"minimum": 0
}
},
"additionalProperties": false
}
}
},
"required": ["items"],
"additionalProperties": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"self": {
"vendor": "com.google.tag-manager.server-side",
"name": "earn_virtual_currency",
"version": "1-0-0",
"format": "jsonschema"
},
"description": "This event measures the awarding of virtual currency.",
"type": "object",
"properties": {
"virtual_currency_name": {
"description": "The name of the virtual currency.",
"type": ["string", "null"],
"maxLength": 4096
},
"value": {
"description": "The value of the virtual currency.",
"type": ["number", "null"],
"minimum": 0
}
},
"additionalProperties": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"self": {
"vendor": "com.google.tag-manager.server-side",
"name": "level_end",
"version": "1-0-0",
"format": "jsonschema"
},
"description": "This event signifies that a player has reached the end of a level.",
"type": "object",
"properties": {
"level_name": {
"description": "The name of the level.",
"type": ["string", "null"],
"maxLength": 4096
},
"success": {
"description": "Set to true if the level was completed successfully.",
"type": ["boolean", "null"]
}
},
"additionalProperties": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"self": {
"vendor": "com.google.tag-manager.server-side",
"name": "level_start",
"version": "1-0-0",
"format": "jsonschema"
},
"description": "This event signifies that a player has started a level.",
"type": "object",
"properties": {
"level_name": {
"description": "The name of the level.",
"type": ["string", "null"],
"maxLength": 4096
}
},
"additionalProperties": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"self": {
"vendor": "com.google.tag-manager.server-side",
"name": "level_up",
"version": "1-0-0",
"format": "jsonschema"
},
"description": "This event signifies that a player has leveled up. Use it to gauge the level distribution of your userbase and identify levels that are difficult to complete.",
"type": "object",
"properties": {
"level": {
"description": "The level of the character.",
"type": ["number", "null"]
},
"character": {
"description": "The character that leveled up.",
"type": ["string", "null"],
"maxLength": 4096

}
},
"additionalProperties": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"self": {
"vendor": "com.google.tag-manager.server-side",
"name": "post_score",
"version": "1-0-0",
"format": "jsonschema"
},
"description": "Send this event when the user posts a score. Use this event to understand how users are performing in your game and correlate high scores with audiences or behaviors.",
"type": "object",
"properties": {
"score": {
"description": "The score to post.",
"type": ["number", "null"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we okay to keep it nullable even if it's a required field?
(for ref: https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#post_score)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, null is fine here.

},
"level": {
"description": "The level for the score.",
"type": ["number", "null"]
},
"character": {
"description": "The character that achieved the score.",
"type": ["string", "null"],
"maxLength": 4096
}
},
"required": ["score"],
"additionalProperties": false
}
Loading
Loading