Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
<script type="text/javascript">
/* YOU SHOULD NOT EDIT THIS PART */
!function(a,b,c){"use strict";function d(a){var b=e[c]||{};e[c]=b,b[a]||(b[a]=function(){e._queue[c].push({method:a,args:Array.prototype.slice.apply(arguments)})})}var e=a.scimhtiraidem||{},f="init call config push pushDefault addProperties addProperty onFinish onStart _reset".split(" ");e._queue=e._queue||{},e._names=e._names||[],e._names.push(c),e._queue[c]=e._queue[c]||[],e._startTime=(new Date).getTime(),e._snippetVersion="2.0";for(var g=0;g<f.length;g++)d(f[g]);a.scimhtiraidem=e,a[c]=e[c];var h=b.createElement("script");h.setAttribute("type","text/javascript"),h.setAttribute("src","https://static.mediarithmics.com/tag/1/tag.min.js"),h.setAttribute("async","true"),b.getElementsByTagName("script")[0].parentNode.appendChild(h)}(window,document,"mics");
mics.init("<SITE_TOKEN>");
</script><head>
<title>My site</title>
<meta name="description" content="My site is awesome">
<script type="text/javascript">
/* YOU SHOULD NOT EDIT THIS PART */
!function(a,b,c){"use strict";function d(a){var b=e[c]||{};e[c]=b,b[a]||(b[a]=function(){e._queue[c].push({method:a,args:Array.prototype.slice.apply(arguments)})})}var e=a.scimhtiraidem||{},f="init call config push pushDefault addProperties addProperty onFinish onStart _reset".split(" ");e._queue=e._queue||{},e._names=e._names||[],e._names.push(c),e._queue[c]=e._queue[c]||[],e._startTime=(new Date).getTime(),e._snippetVersion="2.0";for(var g=0;g<f.length;g++)d(f[g]);a.scimhtiraidem=e,a[c]=e[c];var h=b.createElement("script");h.setAttribute("type","text/javascript"),h.setAttribute("src","https://static.mediarithmics.com/tag/2/tag.min.js"),h.setAttribute("async","true"),b.getElementsByTagName("script")[0].parentNode.appendChild(h)}(window,document,"mics");
mics.init("my-site-token");
</script>
</head><script type="text/javascript">
/* YOU SHOULD NOT EDIT THIS PART */
!function(a,b,c){"use strict";function d(a){var b=e[c]||{};e[c]=b,b[a]||(b[a]=function(){e._queue[c].push({method:a,args:Array.prototype.slice.apply(arguments)})})}var e=a.scimhtiraidem||{},f="init call config push pushDefault addProperties addProperty onFinish onStart _reset".split(" ");e._queue=e._queue||{},e._names=e._names||[],e._names.push(c),e._queue[c]=e._queue[c]||[],e._startTime=(new Date).getTime(),e._snippetVersion="2.0";for(var g=0;g<f.length;g++)d(f[g]);a.scimhtiraidem=e,a[c]=e[c];var h=b.createElement("script");h.setAttribute("type","text/javascript"),h.setAttribute("src","https://static.mediarithmics.com/tag/1/tag.min.js"),h.setAttribute("async","true"),b.getElementsByTagName("script")[0].parentNode.appendChild(h)}(window,document,"mics");
mics.init("my-site-token");
</script><script type="text/javascript">
/* YOU SHOULD NOT EDIT THIS PART */
!function(a,b,c){"use strict";function d(a){var b=e[c]||{};e[c]=b,b[a]||(b[a]=function(){e._queue[c].push({method:a,args:Array.prototype.slice.apply(arguments)})})}var e=a.scimhtiraidem||{},f="init call config push pushDefault addProperties addProperty onFinish onStart _reset".split(" ");e._queue=e._queue||{},e._names=e._names||[],e._names.push(c),e._queue[c]=e._queue[c]||[],e._startTime=(new Date).getTime(),e._snippetVersion="2.0";for(var g=0;g<f.length;g++)d(f[g]);a.scimhtiraidem=e,a[c]=e[c];var h=b.createElement("script");h.setAttribute("type","text/javascript"),h.setAttribute("src","https://static.mediarithmics.com/tag/1/tag.min.js"),h.setAttribute("async","true"),b.getElementsByTagName("script")[0].parentNode.appendChild(h)}(window,document,"mics");
mics.init("<SITE_TOKEN>");
mics.push("my-event");
</script>type UserPoint @TreeIndexRoot(index:"USER_INDEX") {
id:ID!
segments:[UserSegment!]!
agents:[UserAgent!]!
creation_date:Date! @Function(params:["creation_ts"], name:"ISODate")
creation_ts:Timestamp! @TreeIndex(index:"USER_INDEX")
activities:[UserActivity!]!
}
type UserActivity {
id:ID! @TreeIndex(index:"USER_INDEX")
duration:Int @TreeIndex(index:"USER_INDEX")
ts:Timestamp! @TreeIndex(index:"USER_INDEX")
events:[UserEvent!]!
}
type UserEvent @Mirror(object_type:"UserEvent") {
ts:Timestamp! @TreeIndex(index:"USER_INDEX")
name:String! @TreeIndex(index:"USER_INDEX")
id:ID! @TreeIndex(index:"USER_INDEX")
}type UserPoint @TreeIndexRoot(index:"USER_INDEX") {
id:ID!
segments:[UserSegment!]!
agents:[UserAgent!]!
creation_date:Date! @Function(params:["creation_ts"], name:"ISODate")
creation_ts:Timestamp! @TreeIndex(index:"USER_INDEX")
events:[ActivityEvent!]!
}
type ActivityEvent @Mirror(object_type:"UserEvent") {
id:ID! @TreeIndex(index:"USER_INDEX")
ts:Timestamp! @TreeIndex(index:"USER_INDEX")
name:String! @TreeIndex(index:"USER_INDEX")
}<script type="text/javascript">
/* YOU SHOULD NOT EDIT THIS PART */
!function(a,b,c){"use strict";function d(a){var b=e[c]||{};e[c]=b,b[a]||(b[a]=function(){e._queue[c].push({method:a,args:Array.prototype.slice.apply(arguments)})})}var e=a.scimhtiraidem||{},f="init call config push pushDefault addProperties addProperty onFinish onStart _reset".split(" ");e._queue=e._queue||{},e._names=e._names||[],e._names.push(c),e._queue[c]=e._queue[c]||[],e._startTime=(new Date).getTime(),e._snippetVersion="2.0";for(var g=0;g<f.length;g++)d(f[g]);a.scimhtiraidem=e,a[c]=e[c];var h=b.createElement("script");h.setAttribute("type","text/javascript"),h.setAttribute("src","https://static.mediarithmics.com/tag/1/tag.min.js"),h.setAttribute("async","true"),b.getElementsByTagName("script")[0].parentNode.appendChild(h)}(window,document,"mics");
mics.init("<SITE_TOKEN>");
mics.push(
"product-view",
{
"category_id": 53,
"category_name": "Smartphones"
}
);
</script>mics.push("my-event-name");type UserEvent {
id:ID! @TreeIndex(index:"USER_INDEX")
ts:Timestamp! @TreeIndex(index:"USER_INDEX")
name:String! @TreeIndex(index:"USER_INDEX")
items:[Item!]
}
type Item {
id:ID! @TreeIndex(index:"USER_INDEX")
brand:String! @TreeIndex(index:"USER_INDEX")
name:String! @TreeIndex(index:"USER_INDEX")
}split -l <LINE_NUMBER> ./your/file/pathmics.push("cart-view", {
"items": [
{
"brand": "brand name 1",
"name": "product name 1",
"id": 1
},
{
"brand": "brand name 2",
"name": "product name 2",
"id": 2
}
],
});curl --location --request GET 'https://api.mediarithmics.com/v1/plugins?max_results=100' \
--header 'content-type: application/json' \
--header 'Authorization: <API_TOKEN>'{
"status": "ok",
"data": [
...
],
"count": 100,
"total": 181,
"first_result": 0,
"max_result": 100,
"max_results": 100
}curl -X POST \
https://api.mediarithmics.com/v1/datamarts/<DATAMART_ID>/document_imports \
-H 'Authorization: <YOUR_API_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"document_type": "USER_ACTIVITY",
"mime_type": "APPLICATION_X_NDJSON",
"encoding": "utf-8",
"name": "My user activity document import"
}'{
"status": "ok",
"data": {
"id": "<DOCUMENT_IMPORT_ID>",
"datafarm_key": "DF_EU_YYYY_MM",
"datamart_id": "<DATAMART_ID>",
"document_type": "USER_ACTIVITY",
"mime_type": "APPLICATION_X_NDJSON",
"encoding": "utf-8",
"name": "My user activity document import",
"priority": "MEDIUM"
}
}{
"$email_hash": {
"$email": "some.email@dummy.com"
},
"$type": "TOUCH",
"$session_status": "NO_SESSION",
"$ts": 1605262037783,
"$events": [{
"$event_name": "store-visit",
"$ts": 1605262037783,
"$properties": {}
}],
"$location": {
"$country": "france",
"$city": "paris",
"$zip_code": "75001"
}
}curl --location --request POST 'https://api.mediarithmics.com/v1/datamarts/<DATAMART_ID>/document_imports/<DOCUMENT_IMPORT_ID>/executions' \
--header 'Content-Type: application/x-ndjson' \
--header 'Authorization: <YOUR_API_TOKEN>' \
--data-raw '{"$email_hash": {"$email": "some.email@dummy.com"},"$type": "TOUCH","$session_status": "NO_SESSION","$ts": 1605262037783,"$events": [{"$event_name": "store-visit","$ts": 1605262037783,"$properties": {}}],"$location": {"$country": "france","$city": "paris","$zip_code": "75001"}}'{
"status": "ok",
"data": {
"parameters": null,
"result": null,
"error": null,
"id": "<DOCUMENT_IMPORT_EXECUTION_ID>",
"status": "PENDING",
"creation_date": 1605271495713,
"start_date": null,
"duration": null,
"organisation_id": "<ORGANISATION_ID>",
"user_id": null,
"cancel_status": null,
"debug": null,
"is_retryable": false,
"permalink_uri": "xxxxxx",
"num_tasks": null,
"completed_tasks": null,
"erroneous_tasks": null,
"retry_count": 0,
"job_type": "DOCUMENT_IMPORT",
"import_mode": "MANUAL_FILE",
"import_type": null
}
}curl --location --request GET 'https://api.mediarithmics.com/v1/datamarts/<DATAMART_ID>/document_imports/<DOCUMENT_IMPORT_ID>/executions/<DOCUMENT_IMPORT_EXECUTION_ID>' \
--header 'Authorization: <YOUR_API_TOKEN>'{
"status": "ok",
"data": {
"parameters": {
"datamart_id": 1502,
"document_import_id": 20517,
"mime_type": "APPLICATION_X_NDJSON",
"document_type": "USER_ACTIVITY",
"input_file_name": "xxxxxx",
"file_uri": "xxxxxx",
"number_of_lines": 1,
"segment_id": null
},
"result": {
"total_success": 1,
"total_failure": 0,
"input_file_name": "xxxxxx",
"input_file_uri": "xxxxxx",
"error_file_uri": "xxxxxx",
"possible_issue_on_identifiers": false,
"top_identifiers": {}
},
"error": null,
"id": "<DOCUMENT_IMPORT_EXECUTION_ID>",
"status": "PENDING",
"creation_date": 1605627687764,
"start_date": 1605627714053,
"duration": 1065,
"organisation_id": "<ORGANISATION_ID>",
"user_id": null,
"cancel_status": null,
"debug": null,
"is_retryable": false,
"permalink_uri": "xxxxxxx",
"num_tasks": 1,
"completed_tasks": 1,
"erroneous_tasks": 0,
"retry_count": 0,
"job_type": "DOCUMENT_IMPORT",
"import_mode": "MANUAL_FILE",
"import_type": null,
"end_date": 1605627715118
}
}