diff --git a/package.json b/package.json index adec3da73..f1e7e9f4d 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { "name": "xdm", - "version": "0.4.3", + "version": "0.4.5", "description": "Experience Data Models", "main": "", "config": { "aem_user": "packageUser", "aem_password": "override me securely", "markdown-importer-version": "0.0.4", - "schemas": 79 + "schemas": 101 }, "scripts": { "clean": "rm -rf docs/reference", diff --git a/schemas/channels/channel.example.1.json b/schemas/channels/channel.example.1.json index f1651300d..48c31479f 100644 --- a/schemas/channels/channel.example.1.json +++ b/schemas/channels/channel.example.1.json @@ -1,4 +1,8 @@ { "@id": "https://ns.adobe.com/xdm/channels/facebook-feed", - "@type": "https://ns.adobe.com/xdm/channel-types/social" + "@type": "https://ns.adobe.com/xdm/channel-types/social", + "xdm:metrics": [ + "https://ns.adobe.com/xdm/data/metrics/web/page-views", + "https://ns.adobe.com/xdm/data/metrics/web/link-clicks" + ] } diff --git a/schemas/data/abandons.example.1.json b/schemas/data/abandons.example.1.json new file mode 100644 index 000000000..feeb37307 --- /dev/null +++ b/schemas/data/abandons.example.1.json @@ -0,0 +1,6 @@ +{ + "schema:name": "commerce metric: abandons", + "@id": "https://ns.adobe.com/xdm/data/metrics/commerce/abandons", + "xdm:measurement": "count", + "xdm:unit": null +} diff --git a/schemas/data/abandons.schema.json b/schemas/data/abandons.schema.json new file mode 100644 index 000000000..7ed1b17d9 --- /dev/null +++ b/schemas/data/abandons.schema.json @@ -0,0 +1,53 @@ +{ + "meta:license": [ + "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/data/metrics/commerce/abandons", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "abandons", + "type": "object", + "meta:extensible": true, + "meta:extends": [ + "https://ns.adobe.com/xdm/data/metric" + ], + "description": "Number of abandons for which a product list has been identified as no longer purchasable or accessible by the user without the user re-creating the product list from scratch.", + "definitions": { + "metric": { + "properties": { + "@id": { + "type": "string", + "format": "uri", + "const": "https://ns.adobe.com/xdm/data/metrics/commerce/abandons", + "description": "The unique identifier of this metric." + }, + "schema:name": { + "type": "string", + "const": "commerce metric: abandons", + "description": "The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique." + }, + "xdm:measurement": { + "type": "string", + "description": "How to take measures of this metric.", + "const": "count" + }, + "xdm:unit": { + "const": null + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/metric" + } + ], + "required": [ + "@id", + "schema:name", + "xdm:measurement", + "xdm:unit" + ] +} diff --git a/schemas/data/bounces.example.1.json b/schemas/data/bounces.example.1.json new file mode 100644 index 000000000..c7aab207e --- /dev/null +++ b/schemas/data/bounces.example.1.json @@ -0,0 +1,6 @@ +{ + "schema:name": "direct-marketing metric: bounces", + "@id": "https://ns.adobe.com/xdm/data/metrics/direct-marketing/bounces", + "xdm:measurement": "count", + "xdm:unit": null +} diff --git a/schemas/data/bounces.schema.json b/schemas/data/bounces.schema.json new file mode 100644 index 000000000..ded2c39f1 --- /dev/null +++ b/schemas/data/bounces.schema.json @@ -0,0 +1,53 @@ +{ + "meta:license": [ + "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/data/metrics/direct-marketing/bounces", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "bounces", + "type": "object", + "meta:extensible": true, + "meta:extends": [ + "https://ns.adobe.com/xdm/data/metric" + ], + "description": "The direct-marketing metric bounces describes the number of asynchronous messages that have been rejected by the receiving system.", + "definitions": { + "metric": { + "properties": { + "@id": { + "type": "string", + "format": "uri", + "const": "https://ns.adobe.com/xdm/data/metrics/direct-marketing/bounces", + "description": "The unique identifier of this metric." + }, + "schema:name": { + "type": "string", + "const": "direct-marketing metric: bounces", + "description": "The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique." + }, + "xdm:measurement": { + "type": "string", + "description": "How to take measures of this metric.", + "const": "count" + }, + "xdm:unit": { + "const": null + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/metric" + } + ], + "required": [ + "@id", + "schema:name", + "xdm:measurement", + "xdm:unit" + ] +} diff --git a/schemas/data/checkouts.example.1.json b/schemas/data/checkouts.example.1.json new file mode 100644 index 000000000..3cca1340b --- /dev/null +++ b/schemas/data/checkouts.example.1.json @@ -0,0 +1,6 @@ +{ + "schema:name": "commerce metric: checkouts", + "@id": "https://ns.adobe.com/xdm/data/metrics/commerce/checkouts", + "xdm:measurement": "count", + "xdm:unit": null +} diff --git a/schemas/data/checkouts.schema.json b/schemas/data/checkouts.schema.json new file mode 100644 index 000000000..cf814be66 --- /dev/null +++ b/schemas/data/checkouts.schema.json @@ -0,0 +1,53 @@ +{ + "meta:license": [ + "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/data/metrics/commerce/checkouts", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "checkouts", + "type": "object", + "meta:extensible": true, + "meta:extends": [ + "https://ns.adobe.com/xdm/data/metric" + ], + "description": "Number of actions during a checkout process of a product list, there can be more than one checkout event if there are multiple steps in a checkout process. If there are multiple steps the event time information and referenced page or experience is used to identify the step individual events represent in order.", + "definitions": { + "metric": { + "properties": { + "@id": { + "type": "string", + "format": "uri", + "const": "https://ns.adobe.com/xdm/data/metrics/commerce/checkouts", + "description": "The unique identifier of this metric." + }, + "schema:name": { + "type": "string", + "const": "commerce metric: checkouts", + "description": "The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique." + }, + "xdm:measurement": { + "type": "string", + "description": "How to take measures of this metric.", + "const": "count" + }, + "xdm:unit": { + "const": null + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/metric" + } + ], + "required": [ + "@id", + "schema:name", + "xdm:measurement", + "xdm:unit" + ] +} diff --git a/schemas/data/clicks.example.1.json b/schemas/data/clicks.example.1.json new file mode 100644 index 000000000..413010e51 --- /dev/null +++ b/schemas/data/clicks.example.1.json @@ -0,0 +1,6 @@ +{ + "schema:name": "advertising metric: clicks", + "@id": "https://ns.adobe.com/xdm/data/metrics/advertising/clicks", + "xdm:measurement": "count", + "xdm:unit": null +} diff --git a/schemas/data/clicks.schema.json b/schemas/data/clicks.schema.json new file mode 100644 index 000000000..9c669388b --- /dev/null +++ b/schemas/data/clicks.schema.json @@ -0,0 +1,53 @@ +{ + "meta:license": [ + "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/data/metrics/advertising/clicks", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "clicks", + "type": "object", + "meta:extensible": true, + "meta:extends": [ + "https://ns.adobe.com/xdm/data/metric" + ], + "description": "The advertising metric clicks describes…", + "definitions": { + "metric": { + "properties": { + "@id": { + "type": "string", + "format": "uri", + "const": "https://ns.adobe.com/xdm/data/metrics/advertising/clicks", + "description": "The unique identifier of this metric." + }, + "schema:name": { + "type": "string", + "const": "advertising metric: clicks", + "description": "The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique." + }, + "xdm:measurement": { + "type": "string", + "description": "How to take measures of this metric.", + "const": "count" + }, + "xdm:unit": { + "const": null + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/metric" + } + ], + "required": [ + "@id", + "schema:name", + "xdm:measurement", + "xdm:unit" + ] +} diff --git a/schemas/data/impressions.example.1.json b/schemas/data/impressions.example.1.json new file mode 100644 index 000000000..5d2656089 --- /dev/null +++ b/schemas/data/impressions.example.1.json @@ -0,0 +1,6 @@ +{ + "schema:name": "advertising metric: impressions", + "@id": "https://ns.adobe.com/xdm/data/metrics/advertising/impressions", + "xdm:measurement": "count", + "xdm:unit": null +} diff --git a/schemas/data/impressions.schema.json b/schemas/data/impressions.schema.json new file mode 100644 index 000000000..bbe16fa55 --- /dev/null +++ b/schemas/data/impressions.schema.json @@ -0,0 +1,53 @@ +{ + "meta:license": [ + "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/data/metrics/advertising/impressions", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "impressions", + "type": "object", + "meta:extensible": true, + "meta:extends": [ + "https://ns.adobe.com/xdm/data/metric" + ], + "description": "The advertising metric impressions describes…", + "definitions": { + "metric": { + "properties": { + "@id": { + "type": "string", + "format": "uri", + "const": "https://ns.adobe.com/xdm/data/metrics/advertising/impressions", + "description": "The unique identifier of this metric." + }, + "schema:name": { + "type": "string", + "const": "advertising metric: impressions", + "description": "The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique." + }, + "xdm:measurement": { + "type": "string", + "description": "How to take measures of this metric.", + "const": "count" + }, + "xdm:unit": { + "const": null + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/metric" + } + ], + "required": [ + "@id", + "schema:name", + "xdm:measurement", + "xdm:unit" + ] +} diff --git a/schemas/data/link-clicks.example.1.json b/schemas/data/link-clicks.example.1.json new file mode 100644 index 000000000..9f0cb6f5d --- /dev/null +++ b/schemas/data/link-clicks.example.1.json @@ -0,0 +1,6 @@ +{ + "schema:name": "web metric: link-clicks", + "@id": "https://ns.adobe.com/xdm/data/metrics/web/link-clicks", + "xdm:measurement": "count", + "xdm:unit": null +} diff --git a/schemas/data/link-clicks.schema.json b/schemas/data/link-clicks.schema.json new file mode 100644 index 000000000..e62cbcbbb --- /dev/null +++ b/schemas/data/link-clicks.schema.json @@ -0,0 +1,53 @@ +{ + "meta:license": [ + "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/data/metrics/web/link-clicks", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "link-clicks", + "type": "object", + "meta:extensible": true, + "meta:extends": [ + "https://ns.adobe.com/xdm/data/metric" + ], + "description": "The web metric link-clicks describes the number of clicks on a link on a web page.", + "definitions": { + "metric": { + "properties": { + "@id": { + "type": "string", + "format": "uri", + "const": "https://ns.adobe.com/xdm/data/metrics/web/link-clicks", + "description": "The unique identifier of this metric." + }, + "schema:name": { + "type": "string", + "const": "web metric: link-clicks", + "description": "The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique." + }, + "xdm:measurement": { + "type": "string", + "description": "How to take measures of this metric.", + "const": "count" + }, + "xdm:unit": { + "const": null + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/metric" + } + ], + "required": [ + "@id", + "schema:name", + "xdm:measurement", + "xdm:unit" + ] +} diff --git a/schemas/data/makemetric.sh b/schemas/data/makemetric.sh new file mode 100644 index 000000000..9ce9a1cdc --- /dev/null +++ b/schemas/data/makemetric.sh @@ -0,0 +1,70 @@ +#/!bin/sh + +# This is a helper script to quickly create new metric definitions. +# Usage: +# $ sh makemetric.sh +# + +cat << EOF | jq . > $2.schema.json +{ + "meta:license": [ + "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "\$id": "https://ns.adobe.com/xdm/data/metrics/$1/$2", + "\$schema": "http://json-schema.org/draft-06/schema#", + "title": "$2", + "type": "object", + "meta:extensible": true, + "meta:extends": [ "https://ns.adobe.com/xdm/data/metric" ], + "description": "The $1 metric $2 describes…", + "definitions": { + "metric": { + "properties": { + "@id": { + "type": "string", + "format": "uri", + "const": "https://ns.adobe.com/xdm/data/metrics/$1/$2", + "description": "The unique identifier of this metric." + }, + "schema:name": { + "type": "string", + "const": "$1 metric: $2", + "description": "The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique." + }, + "xdm:measurement": { + "type": "string", + "description": "How to take measures of this metric.", + "const": "count" + }, + "xdm:unit": { + "type": "string", + "const": null + } + } + } + }, + "allOf": [ + { + "\$ref": "#/definitions/metric" + } + ], + "required": [ + "@id", + "schema:name", + "xdm:measurement", + "xdm:unit" + ] +} +EOF + +cat << EOF | jq . > $2.example.1.json +{ + "schema:name": "$1 metric: $2", + "@id": "https://ns.adobe.com/xdm/data/metrics/$1/$2", + "xdm:measurement": "count", + "xdm:unit": null +} +EOF diff --git a/schemas/data/measure.description.md b/schemas/data/measure.description.md new file mode 100644 index 000000000..cd5d23791 --- /dev/null +++ b/schemas/data/measure.description.md @@ -0,0 +1,3 @@ +A measure is a concrete quantifiable data point of a particular metric. + +It has a value, and optionally a unit, although the unit can be inferred from the measure's metric. diff --git a/schemas/data/measure.example.1.json b/schemas/data/measure.example.1.json new file mode 100644 index 000000000..34cce7b3d --- /dev/null +++ b/schemas/data/measure.example.1.json @@ -0,0 +1,5 @@ +{ + "@type": "https://ns.adobe.com/xdm/data/example-metric", + "unit": null, + "xdm:value": 175 +} diff --git a/schemas/data/measure.schema.json b/schemas/data/measure.schema.json new file mode 100644 index 000000000..842e13544 --- /dev/null +++ b/schemas/data/measure.schema.json @@ -0,0 +1,54 @@ +{ + "meta:license": [ + "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/data/measure", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "Measure", + "type": "object", + "meta:extensible": false, + "description": "", + "definitions": { + "measure": { + "properties": { + "@type": { + "type": "string", + "format": "uri", + "description": "Links to the `Metric` that this measure refers to. The `@type` can be omitted in contexts where it is obvious what metric is being referred to, for instance in the `Metrics` object that is keyed with `Metric` URIs." + }, + "xdm:value": { + "type": "number", + "description": "The quantifiable value of this measure." + }, + "xdm:unit": { + "anyOf": [ + { + "type": "string" + }, + { + "const": null + } + ], + "description": "The (optional) unit that this measure's value is measured in. The `unit` in the `Measure` is purely informational, as the `unit` property of the referenced `Metric` determines the interpretation.", + "examples": [ + "m", + "kg", + "s", + "USD" + ] + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/measure" + } + ], + "required": [ + "xdm:value" + ] +} diff --git a/schemas/data/metric.description.md b/schemas/data/metric.description.md new file mode 100644 index 000000000..071895902 --- /dev/null +++ b/schemas/data/metric.description.md @@ -0,0 +1,6 @@ +A metric is a definition of a measurable or countable quantity. + +A metric consists of a measurement and a dimension. +For easier identification, metrics have a name and a unique URI that can be used when referring to the metric. + +Through XDM's extensibility mechanism, new metrics can be defined by extending `Metric`. diff --git a/schemas/data/metric.example.1.json b/schemas/data/metric.example.1.json new file mode 100644 index 000000000..39de88073 --- /dev/null +++ b/schemas/data/metric.example.1.json @@ -0,0 +1,6 @@ +{ + "schema:name": "Example Metric", + "@id": "https://ns.adobe.com/xdm/data/example-metric", + "xdm:measurement": "weight", + "xdm:unit": "kg" +} diff --git a/schemas/data/metric.schema.json b/schemas/data/metric.schema.json new file mode 100644 index 000000000..1d6a161df --- /dev/null +++ b/schemas/data/metric.schema.json @@ -0,0 +1,60 @@ +{ + "meta:license": [ + "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/data/metric", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "Metric", + "type": "object", + "meta:extensible": true, + "description": "", + "definitions": { + "metric": { + "properties": { + "@id": { + "type": "string", + "format": "uri", + "description": "The unique identifier of this metric." + }, + "schema:name": { + "type": "string", + "description": "The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique." + }, + "xdm:measurement": { + "type": "string", + "description": "How to take measures of this metric.", + "examples": [ + "distance", + "time", + "price", + "count" + ] + }, + "xdm:unit": { + "type": "string", + "description": "The unit that this metric is measured in. Whenever possible, metrics should follow the [SI base units](https://www.bipm.org/en/measurement-units/) or be [ISO 4217 currency codes](https://www.iso.org/iso-4217-currency-codes.html). For measures that are counts, the `xdm:unit` must be `null`.", + "examples": [ + "m", + "kg", + "s", + "USD" + ] + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/metric" + } + ], + "required": [ + "@id", + "schema:name", + "xdm:measurement", + "xdm:unit" + ] +} diff --git a/schemas/data/metrics.example.1.json b/schemas/data/metrics.example.1.json new file mode 100644 index 000000000..715f3d5a3 --- /dev/null +++ b/schemas/data/metrics.example.1.json @@ -0,0 +1,14 @@ +{ + "https://ns.adobe.com/xdm/data/metrics/direct-marketing/sends": { + "xdm:value": 1000 + }, + "https://ns.adobe.com/xdm/data/metrics/commerce/product-views": { + "xdm:value": 20, + "xdm:unit": null + }, + "https://ns.adobe.com/xdm/data/metrics/web/page-views": { + "@type": "https://ns.adobe.com/xdm/data/metrics/web/page-views", + "xdm:value": 1625, + "xdm:unit": null + } +} diff --git a/schemas/data/metrics.schema.json b/schemas/data/metrics.schema.json new file mode 100644 index 000000000..c9cea9246 --- /dev/null +++ b/schemas/data/metrics.schema.json @@ -0,0 +1,19 @@ +{ + "meta:license": [ + "Copyright 2017 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/data/metrics", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "Metrics", + "type": "object", + "description": "This is map of metrics and measues. Each key is the valid URI of a known `Metric`. Each value is a `Measure`, i.e. a concrete data point.", + "patternProperties": { + ".+://.+": { + "$ref": "https://ns.adobe.com/xdm/data/measure" + } + }, + "additionalProperties": false +} diff --git a/schemas/data/mirror-pages.example.1.json b/schemas/data/mirror-pages.example.1.json new file mode 100644 index 000000000..69ebeb5b6 --- /dev/null +++ b/schemas/data/mirror-pages.example.1.json @@ -0,0 +1,6 @@ +{ + "schema:name": "direct-marketing metric: mirror-pages", + "@id": "https://ns.adobe.com/xdm/data/metrics/direct-marketing/mirror-pages", + "xdm:measurement": "count", + "xdm:unit": null +} diff --git a/schemas/data/mirror-pages.schema.json b/schemas/data/mirror-pages.schema.json new file mode 100644 index 000000000..17373ccc7 --- /dev/null +++ b/schemas/data/mirror-pages.schema.json @@ -0,0 +1,53 @@ +{ + "meta:license": [ + "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/data/metrics/direct-marketing/mirror-pages", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "mirror-pages", + "type": "object", + "meta:extensible": true, + "meta:extends": [ + "https://ns.adobe.com/xdm/data/metric" + ], + "description": "The direct-marketing metric mirror-pages describes the number of mirror pages for which a link to the online mirror page of a message has been clicked.", + "definitions": { + "metric": { + "properties": { + "@id": { + "type": "string", + "format": "uri", + "const": "https://ns.adobe.com/xdm/data/metrics/direct-marketing/mirror-pages", + "description": "The unique identifier of this metric." + }, + "schema:name": { + "type": "string", + "const": "direct-marketing metric: mirror-pages", + "description": "The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique." + }, + "xdm:measurement": { + "type": "string", + "description": "How to take measures of this metric.", + "const": "count" + }, + "xdm:unit": { + "const": null + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/metric" + } + ], + "required": [ + "@id", + "schema:name", + "xdm:measurement", + "xdm:unit" + ] +} diff --git a/schemas/data/non-deliverables.example.1.json b/schemas/data/non-deliverables.example.1.json new file mode 100644 index 000000000..b52dd6d7b --- /dev/null +++ b/schemas/data/non-deliverables.example.1.json @@ -0,0 +1,6 @@ +{ + "schema:name": "direct-marketing metric: non-deliverables", + "@id": "https://ns.adobe.com/xdm/data/metrics/direct-marketing/non-deliverables", + "xdm:measurement": "count", + "xdm:unit": null +} diff --git a/schemas/data/non-deliverables.schema.json b/schemas/data/non-deliverables.schema.json new file mode 100644 index 000000000..7270ee021 --- /dev/null +++ b/schemas/data/non-deliverables.schema.json @@ -0,0 +1,53 @@ +{ + "meta:license": [ + "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/data/metrics/direct-marketing/non-deliverables", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "non-deliverables", + "type": "object", + "meta:extensible": true, + "meta:extends": [ + "https://ns.adobe.com/xdm/data/metric" + ], + "description": "The direct-marketing metric non-deliverables describes the umber of asynchronous messages that failed to deliver in a way that indicates that no future messages will be deliverable either to this address.", + "definitions": { + "metric": { + "properties": { + "@id": { + "type": "string", + "format": "uri", + "const": "https://ns.adobe.com/xdm/data/metrics/direct-marketing/non-deliverables", + "description": "The unique identifier of this metric." + }, + "schema:name": { + "type": "string", + "const": "direct-marketing metric: non-deliverables", + "description": "The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique." + }, + "xdm:measurement": { + "type": "string", + "description": "How to take measures of this metric.", + "const": "count" + }, + "xdm:unit": { + "const": null + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/metric" + } + ], + "required": [ + "@id", + "schema:name", + "xdm:measurement", + "xdm:unit" + ] +} diff --git a/schemas/data/page-views.example.1.json b/schemas/data/page-views.example.1.json new file mode 100644 index 000000000..128d12f41 --- /dev/null +++ b/schemas/data/page-views.example.1.json @@ -0,0 +1,6 @@ +{ + "schema:name": "web metric: page-views", + "@id": "https://ns.adobe.com/xdm/data/metrics/web/page-views", + "xdm:measurement": "count", + "xdm:unit": null +} diff --git a/schemas/data/page-views.schema.json b/schemas/data/page-views.schema.json new file mode 100644 index 000000000..c25dce830 --- /dev/null +++ b/schemas/data/page-views.schema.json @@ -0,0 +1,53 @@ +{ + "meta:license": [ + "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/data/metrics/web/page-views", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "page-views", + "type": "object", + "meta:extensible": true, + "meta:extends": [ + "https://ns.adobe.com/xdm/data/metric" + ], + "description": "The web metric page-views describes the number of impressions of a web page.", + "definitions": { + "metric": { + "properties": { + "@id": { + "type": "string", + "format": "uri", + "const": "https://ns.adobe.com/xdm/data/metrics/web/page-views", + "description": "The unique identifier of this metric." + }, + "schema:name": { + "type": "string", + "const": "web metric: page-views", + "description": "The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique." + }, + "xdm:measurement": { + "type": "string", + "description": "How to take measures of this metric.", + "const": "count" + }, + "xdm:unit": { + "const": null + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/metric" + } + ], + "required": [ + "@id", + "schema:name", + "xdm:measurement", + "xdm:unit" + ] +} diff --git a/schemas/data/product-list-adds.example.1.json b/schemas/data/product-list-adds.example.1.json new file mode 100644 index 000000000..0af9a1a4b --- /dev/null +++ b/schemas/data/product-list-adds.example.1.json @@ -0,0 +1,6 @@ +{ + "schema:name": "commerce metric: product-list-adds", + "@id": "https://ns.adobe.com/xdm/data/metrics/commerce/product-list-adds", + "xdm:measurement": "count", + "xdm:unit": null +} diff --git a/schemas/data/product-list-adds.schema.json b/schemas/data/product-list-adds.schema.json new file mode 100644 index 000000000..3490281e4 --- /dev/null +++ b/schemas/data/product-list-adds.schema.json @@ -0,0 +1,53 @@ +{ + "meta:license": [ + "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/data/metrics/commerce/product-list-adds", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "product-list-adds", + "type": "object", + "meta:extensible": true, + "meta:extends": [ + "https://ns.adobe.com/xdm/data/metric" + ], + "description": "The commerce metric product-list-adds describes the number of times a product has been added to a product list. The most common case is adding an item to the shopping cart.", + "definitions": { + "metric": { + "properties": { + "@id": { + "type": "string", + "format": "uri", + "const": "https://ns.adobe.com/xdm/data/metrics/commerce/product-list-adds", + "description": "The unique identifier of this metric." + }, + "schema:name": { + "type": "string", + "const": "commerce metric: product-list-adds", + "description": "The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique." + }, + "xdm:measurement": { + "type": "string", + "description": "How to take measures of this metric.", + "const": "count" + }, + "xdm:unit": { + "const": null + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/metric" + } + ], + "required": [ + "@id", + "schema:name", + "xdm:measurement", + "xdm:unit" + ] +} diff --git a/schemas/data/product-list-opens.example.1.json b/schemas/data/product-list-opens.example.1.json new file mode 100644 index 000000000..e419211eb --- /dev/null +++ b/schemas/data/product-list-opens.example.1.json @@ -0,0 +1,6 @@ +{ + "schema:name": "commerce metric: product-list-opens", + "@id": "https://ns.adobe.com/xdm/data/metrics/commerce/product-list-opens", + "xdm:measurement": "count", + "xdm:unit": null +} diff --git a/schemas/data/product-list-opens.schema.json b/schemas/data/product-list-opens.schema.json new file mode 100644 index 000000000..c304eabfe --- /dev/null +++ b/schemas/data/product-list-opens.schema.json @@ -0,0 +1,53 @@ +{ + "meta:license": [ + "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/data/metrics/commerce/product-list-opens", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "product-list-opens", + "type": "object", + "meta:extensible": true, + "meta:extends": [ + "https://ns.adobe.com/xdm/data/metric" + ], + "description": "The commerce metric product-list-opens describes how many new product lists have been created. The most common case is the creation of a new shopping cart by putting the first item into the shopping cart.", + "definitions": { + "metric": { + "properties": { + "@id": { + "type": "string", + "format": "uri", + "const": "https://ns.adobe.com/xdm/data/metrics/commerce/product-list-opens", + "description": "The unique identifier of this metric." + }, + "schema:name": { + "type": "string", + "const": "commerce metric: product-list-opens", + "description": "The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique." + }, + "xdm:measurement": { + "type": "string", + "description": "How to take measures of this metric.", + "const": "count" + }, + "xdm:unit": { + "const": null + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/metric" + } + ], + "required": [ + "@id", + "schema:name", + "xdm:measurement", + "xdm:unit" + ] +} diff --git a/schemas/data/product-list-removals.example.1.json b/schemas/data/product-list-removals.example.1.json new file mode 100644 index 000000000..1df7520f9 --- /dev/null +++ b/schemas/data/product-list-removals.example.1.json @@ -0,0 +1,6 @@ +{ + "schema:name": "commerce metric: product-list-removals", + "@id": "https://ns.adobe.com/xdm/data/metrics/commerce/product-list-removals", + "xdm:measurement": "count", + "xdm:unit": null +} diff --git a/schemas/data/product-list-removals.schema.json b/schemas/data/product-list-removals.schema.json new file mode 100644 index 000000000..f958b5b65 --- /dev/null +++ b/schemas/data/product-list-removals.schema.json @@ -0,0 +1,53 @@ +{ + "meta:license": [ + "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/data/metrics/commerce/product-list-removals", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "product-list-removals", + "type": "object", + "meta:extensible": true, + "meta:extends": [ + "https://ns.adobe.com/xdm/data/metric" + ], + "description": "The commerce metric product-list-removals describes the number of times a product has been removed from a product list. The most common use case is the removal of a product from the shopping cart.", + "definitions": { + "metric": { + "properties": { + "@id": { + "type": "string", + "format": "uri", + "const": "https://ns.adobe.com/xdm/data/metrics/commerce/product-list-removals", + "description": "The unique identifier of this metric." + }, + "schema:name": { + "type": "string", + "const": "commerce metric: product-list-removals", + "description": "The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique." + }, + "xdm:measurement": { + "type": "string", + "description": "How to take measures of this metric.", + "const": "count" + }, + "xdm:unit": { + "const": null + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/metric" + } + ], + "required": [ + "@id", + "schema:name", + "xdm:measurement", + "xdm:unit" + ] +} diff --git a/schemas/data/product-list-reopens.example.1.json b/schemas/data/product-list-reopens.example.1.json new file mode 100644 index 000000000..557958821 --- /dev/null +++ b/schemas/data/product-list-reopens.example.1.json @@ -0,0 +1,6 @@ +{ + "schema:name": "commerce metric: product-list-reopens", + "@id": "https://ns.adobe.com/xdm/data/metrics/commerce/product-list-reopens", + "xdm:measurement": "count", + "xdm:unit": null +} diff --git a/schemas/data/product-list-reopens.schema.json b/schemas/data/product-list-reopens.schema.json new file mode 100644 index 000000000..ecdc7eb04 --- /dev/null +++ b/schemas/data/product-list-reopens.schema.json @@ -0,0 +1,53 @@ +{ + "meta:license": [ + "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/data/metrics/commerce/product-list-reopens", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "product-list-reopens", + "type": "object", + "meta:extensible": true, + "meta:extends": [ + "https://ns.adobe.com/xdm/data/metric" + ], + "description": "Number of reopens for which a product list that was no longer accessible has been re-activated by the user, for example via a re-marketing activity.", + "definitions": { + "metric": { + "properties": { + "@id": { + "type": "string", + "format": "uri", + "const": "https://ns.adobe.com/xdm/data/metrics/commerce/product-list-reopens", + "description": "The unique identifier of this metric." + }, + "schema:name": { + "type": "string", + "const": "commerce metric: product-list-reopens", + "description": "The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique." + }, + "xdm:measurement": { + "type": "string", + "description": "How to take measures of this metric.", + "const": "count" + }, + "xdm:unit": { + "const": null + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/metric" + } + ], + "required": [ + "@id", + "schema:name", + "xdm:measurement", + "xdm:unit" + ] +} diff --git a/schemas/data/product-list-views.example.1.json b/schemas/data/product-list-views.example.1.json new file mode 100644 index 000000000..3e00cf420 --- /dev/null +++ b/schemas/data/product-list-views.example.1.json @@ -0,0 +1,6 @@ +{ + "schema:name": "commerce metric: product-list-views", + "@id": "https://ns.adobe.com/xdm/data/metrics/commerce/product-list-views", + "xdm:measurement": "count", + "xdm:unit": null +} diff --git a/schemas/data/product-list-views.schema.json b/schemas/data/product-list-views.schema.json new file mode 100644 index 000000000..8b8756815 --- /dev/null +++ b/schemas/data/product-list-views.schema.json @@ -0,0 +1,53 @@ +{ + "meta:license": [ + "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/data/metrics/commerce/product-list-views", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "product-list-views", + "type": "object", + "meta:extensible": true, + "meta:extends": [ + "https://ns.adobe.com/xdm/data/metric" + ], + "description": "The commerce metric product-list-views describes how often a product list has been seen by a shopper. The most common use case is to open the shopping cart to inspect its contents.", + "definitions": { + "metric": { + "properties": { + "@id": { + "type": "string", + "format": "uri", + "const": "https://ns.adobe.com/xdm/data/metrics/commerce/product-list-views", + "description": "The unique identifier of this metric." + }, + "schema:name": { + "type": "string", + "const": "commerce metric: product-list-views", + "description": "The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique." + }, + "xdm:measurement": { + "type": "string", + "description": "How to take measures of this metric.", + "const": "count" + }, + "xdm:unit": { + "const": null + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/metric" + } + ], + "required": [ + "@id", + "schema:name", + "xdm:measurement", + "xdm:unit" + ] +} diff --git a/schemas/data/product-views.example.1.json b/schemas/data/product-views.example.1.json new file mode 100644 index 000000000..93a488f76 --- /dev/null +++ b/schemas/data/product-views.example.1.json @@ -0,0 +1,6 @@ +{ + "schema:name": "commerce metric: product-views", + "@id": "https://ns.adobe.com/xdm/data/metrics/commerce/product-views", + "xdm:measurement": "count", + "xdm:unit": null +} diff --git a/schemas/data/product-views.schema.json b/schemas/data/product-views.schema.json new file mode 100644 index 000000000..589849310 --- /dev/null +++ b/schemas/data/product-views.schema.json @@ -0,0 +1,53 @@ +{ + "meta:license": [ + "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/data/metrics/commerce/product-views", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "product-views", + "type": "object", + "meta:extensible": true, + "meta:extends": [ + "https://ns.adobe.com/xdm/data/metric" + ], + "description": "The commerce metric product-views describes the number of product views that have occurred. Because the number of products on a page might be greater than one, this number may differ from the page view count of product pages.", + "definitions": { + "metric": { + "properties": { + "@id": { + "type": "string", + "format": "uri", + "const": "https://ns.adobe.com/xdm/data/metrics/commerce/product-views", + "description": "The unique identifier of this metric." + }, + "schema:name": { + "type": "string", + "const": "commerce metric: product-views", + "description": "The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique." + }, + "xdm:measurement": { + "type": "string", + "description": "How to take measures of this metric.", + "const": "count" + }, + "xdm:unit": { + "const": null + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/metric" + } + ], + "required": [ + "@id", + "schema:name", + "xdm:measurement", + "xdm:unit" + ] +} diff --git a/schemas/data/purchases.example.1.json b/schemas/data/purchases.example.1.json new file mode 100644 index 000000000..e14a89a2e --- /dev/null +++ b/schemas/data/purchases.example.1.json @@ -0,0 +1,6 @@ +{ + "schema:name": "commerce metric: purchases", + "@id": "https://ns.adobe.com/xdm/data/metrics/commerce/purchases", + "xdm:measurement": "count", + "xdm:unit": null +} diff --git a/schemas/data/purchases.schema.json b/schemas/data/purchases.schema.json new file mode 100644 index 000000000..7d26fab5f --- /dev/null +++ b/schemas/data/purchases.schema.json @@ -0,0 +1,53 @@ +{ + "meta:license": [ + "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/data/metrics/commerce/purchases", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "purchases", + "type": "object", + "meta:extensible": true, + "meta:extends": [ + "https://ns.adobe.com/xdm/data/metric" + ], + "description": "Number of orders has occurred. Purchase is the only required action in a commerce conversion. Purchase must have a product list referenced.", + "definitions": { + "metric": { + "properties": { + "@id": { + "type": "string", + "format": "uri", + "const": "https://ns.adobe.com/xdm/data/metrics/commerce/purchases", + "description": "The unique identifier of this metric." + }, + "schema:name": { + "type": "string", + "const": "commerce metric: purchases", + "description": "The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique." + }, + "xdm:measurement": { + "type": "string", + "description": "How to take measures of this metric.", + "const": "count" + }, + "xdm:unit": { + "const": null + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/metric" + } + ], + "required": [ + "@id", + "schema:name", + "xdm:measurement", + "xdm:unit" + ] +} diff --git a/schemas/data/save-for-laters.example.1.json b/schemas/data/save-for-laters.example.1.json new file mode 100644 index 000000000..b72048ac3 --- /dev/null +++ b/schemas/data/save-for-laters.example.1.json @@ -0,0 +1,6 @@ +{ + "schema:name": "commerce metric: save-for-laters", + "@id": "https://ns.adobe.com/xdm/data/metrics/commerce/save-for-laters", + "xdm:measurement": "count", + "xdm:unit": null +} diff --git a/schemas/data/save-for-laters.schema.json b/schemas/data/save-for-laters.schema.json new file mode 100644 index 000000000..1ea86034f --- /dev/null +++ b/schemas/data/save-for-laters.schema.json @@ -0,0 +1,53 @@ +{ + "meta:license": [ + "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/data/metrics/commerce/save-for-laters", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "save-for-laters", + "type": "object", + "meta:extensible": true, + "meta:extends": [ + "https://ns.adobe.com/xdm/data/metric" + ], + "description": "The commerce metric save-for-laters describes how often a product has been saved for a later day purchase.", + "definitions": { + "metric": { + "properties": { + "@id": { + "type": "string", + "format": "uri", + "const": "https://ns.adobe.com/xdm/data/metrics/commerce/save-for-laters", + "description": "The unique identifier of this metric." + }, + "schema:name": { + "type": "string", + "const": "commerce metric: save-for-laters", + "description": "The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique." + }, + "xdm:measurement": { + "type": "string", + "description": "How to take measures of this metric.", + "const": "count" + }, + "xdm:unit": { + "const": null + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/metric" + } + ], + "required": [ + "@id", + "schema:name", + "xdm:measurement", + "xdm:unit" + ] +} diff --git a/schemas/data/sends.example.1.json b/schemas/data/sends.example.1.json new file mode 100644 index 000000000..b55c26429 --- /dev/null +++ b/schemas/data/sends.example.1.json @@ -0,0 +1,6 @@ +{ + "schema:name": "direct-marketing metric: sends", + "@id": "https://ns.adobe.com/xdm/data/metrics/direct-marketing/sends", + "xdm:measurement": "count", + "xdm:unit": null +} diff --git a/schemas/data/sends.schema.json b/schemas/data/sends.schema.json new file mode 100644 index 000000000..f42152071 --- /dev/null +++ b/schemas/data/sends.schema.json @@ -0,0 +1,53 @@ +{ + "meta:license": [ + "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/data/metrics/direct-marketing/sends", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "sends", + "type": "object", + "meta:extensible": true, + "meta:extends": [ + "https://ns.adobe.com/xdm/data/metric" + ], + "description": "The direct-marketing metric sends describes the number of asynchronous messages (email, SMS, MMS etc) that have been dispatched to an recipient's account/address/device", + "definitions": { + "metric": { + "properties": { + "@id": { + "type": "string", + "format": "uri", + "const": "https://ns.adobe.com/xdm/data/metrics/direct-marketing/sends", + "description": "The unique identifier of this metric." + }, + "schema:name": { + "type": "string", + "const": "direct-marketing metric: sends", + "description": "The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique." + }, + "xdm:measurement": { + "type": "string", + "description": "How to take measures of this metric.", + "const": "count" + }, + "xdm:unit": { + "const": null + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/metric" + } + ], + "required": [ + "@id", + "schema:name", + "xdm:measurement", + "xdm:unit" + ] +} diff --git a/schemas/data/user-complaints.example.1.json b/schemas/data/user-complaints.example.1.json new file mode 100644 index 000000000..59bf5772a --- /dev/null +++ b/schemas/data/user-complaints.example.1.json @@ -0,0 +1,6 @@ +{ + "schema:name": "direct-marketing metric: user-complaints", + "@id": "https://ns.adobe.com/xdm/data/metrics/direct-marketing/user-complaints", + "xdm:measurement": "count", + "xdm:unit": null +} diff --git a/schemas/data/user-complaints.schema.json b/schemas/data/user-complaints.schema.json new file mode 100644 index 000000000..d8cb85281 --- /dev/null +++ b/schemas/data/user-complaints.schema.json @@ -0,0 +1,53 @@ +{ + "meta:license": [ + "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/data/metrics/direct-marketing/user-complaints", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "user-complaints", + "type": "object", + "meta:extensible": true, + "meta:extends": [ + "https://ns.adobe.com/xdm/data/metric" + ], + "description": "The direct-marketing metric user-complaints describes the number of user complaints that have been received. This generally occurs when a recipient of a message reported it as spam.", + "definitions": { + "metric": { + "properties": { + "@id": { + "type": "string", + "format": "uri", + "const": "https://ns.adobe.com/xdm/data/metrics/direct-marketing/user-complaints", + "description": "The unique identifier of this metric." + }, + "schema:name": { + "type": "string", + "const": "direct-marketing metric: user-complaints", + "description": "The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique." + }, + "xdm:measurement": { + "type": "string", + "description": "How to take measures of this metric.", + "const": "count" + }, + "xdm:unit": { + "const": null + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/metric" + } + ], + "required": [ + "@id", + "schema:name", + "xdm:measurement", + "xdm:unit" + ] +}