Hi @ihor
I got this “setCustomContextGenerator” from ChatGPT.
the corresponding JSON schema should also be hosted in your Iglu repository
Yes I create the seperate schema for that:
"type": "object",
"properties": {
"domainUserInfo": {
"type": "string"
}
},
"required": [
"domainUserInfo"
]
and I am assuming that we need to send “getDomainUserInfo” to the page ping events. Is it the right understanding? So that’s why I searched for how to send custom context to page ping events.
But it is throwing me this error.
setCustomContextGenerator is not an available function.
I tried to find out the domainInfo in page ping events, but it won’t be there.
[
{
"rawEvent": {
"api": {
"vendor": "com.snowplowanalytics.snowplow",
"version": "tp2"
},
"parameters": {
"e": "pp",
"duid": "502b5559-b365-4709-8d56-c51792f0a6b1",
"vid": "2",
"eid": "e7b46ef2-d3e8-47cd-9e71-71a44ffcb909",
"url": "http://localhost/snowplow/",
"aid": "try-snowplow",
"cx": "eyJzY2hlbWEiOiJpZ2x1OmNvbS5zbm93cGxvd2FuYWx5dGljcy5zbm93cGxvdy9jb250ZXh0cy9qc29uc2NoZW1hLzEtMC0wIiwiZGF0YSI6W3sic2NoZW1hIjoiaWdsdTpjb20uc25vd3Bsb3dhbmFseXRpY3Muc25vd3Bsb3cvd2ViX3BhZ2UvanNvbnNjaGVtYS8xLTAtMCIsImRhdGEiOnsiaWQiOiIxMTNjZTZjZC05NWNlLTQ2ZjItYTVhNS1mODY4NTg4ZjE0MjAifX0seyJzY2hlbWEiOiJpZ2x1Om9yZy53My9QZXJmb3JtYW5jZVRpbWluZy9qc29uc2NoZW1hLzEtMC0wIiwiZGF0YSI6eyJuYXZpZ2F0aW9uU3RhcnQiOjE2ODM0ODQzNjQzNjEsInJlZGlyZWN0U3RhcnQiOjE2ODM0ODQzNjQzNzEsInJlZGlyZWN0RW5kIjoxNjgzNDg0MzY0Mzg1LCJmZXRjaFN0YXJ0IjoxNjgzNDg0MzY0Mzg1LCJkb21haW5Mb29rdXBTdGFydCI6MTY4MzQ4NDM2NDM4NSwiZG9tYWluTG9va3VwRW5kIjoxNjgzNDg0MzY0Mzg1LCJjb25uZWN0U3RhcnQiOjE2ODM0ODQzNjQzODUsInNlY3VyZUNvbm5lY3Rpb25TdGFydCI6MCwiY29ubmVjdEVuZCI6MTY4MzQ4NDM2NDM4NSwicmVxdWVzdFN0YXJ0IjoxNjgzNDg0MzY0Mzg4LCJyZXNwb25zZVN0YXJ0IjoxNjgzNDg0MzY0NDk1LCJyZXNwb25zZUVuZCI6MTY4MzQ4NDM2NDQ5NiwidW5sb2FkRXZlbnRTdGFydCI6MCwidW5sb2FkRXZlbnRFbmQiOjAsImRvbUxvYWRpbmciOjE2ODM0ODQzNjQ1MDIsImRvbUludGVyYWN0aXZlIjoxNjgzNDg0MzY0OTIwLCJkb21Db250ZW50TG9hZGVkRXZlbnRTdGFydCI6MTY4MzQ4NDM2NDkyMCwiZG9tQ29udGVudExvYWRlZEV2ZW50RW5kIjoxNjgzNDg0MzY0OTI0LCJkb21Db21wbGV0ZSI6MTY4MzQ4NDM2NjU4NywibG9hZEV2ZW50U3RhcnQiOjE2ODM0ODQzNjY1ODgsImxvYWRFdmVudEVuZCI6MTY4MzQ4NDM2NjU5OX19XX0",
"tna": "try",
"cs": "UTF-8",
"cd": "24",
"page": "Sitecore CDP - Boxever",
"stm": "1683484436610",
"tz": "Asia/Calcutta",
"tv": "js-3.3.1",
"vp": "1422x632",
"ds": "1415x3278",
"res": "1280x720",
"cookie": "1",
"p": "web",
"dtm": "1683484436602",
"lang": "en-US",
"sid": "058aad71-c270-4696-8799-4d78bb04052d"
},
"contentType": "application/json",
"source": {
"name": "snowplow-micro-1.6.0-stdout$",
"encoding": "UTF-8",
"hostname": "127.0.0.1"
},
"context": {
"timestamp": "2023-05-07T18:33:56.294Z",
"ipAddress": "172.17.0.1",
"useragent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36",
"refererUri": "http://localhost/",
"headers": [
"Timeout-Access: <function1>",
"Host: 127.0.0.1:9090",
"Connection: keep-alive",
"sec-ch-ua: \"Chromium\";v=\"112\", \"Google Chrome\";v=\"112\", \"Not:A-Brand\";v=\"99\"",
"sec-ch-ua-platform: \"Windows\"",
"sec-ch-ua-mobile: ?0",
"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36",
"Accept: */*",
"Origin: http://localhost",
"Sec-Fetch-Site: cross-site",
"Sec-Fetch-Mode: cors",
"Sec-Fetch-Dest: empty",
"Referer: http://localhost/",
"Accept-Encoding: gzip, deflate, br",
"Accept-Language: en-US, en;q=0.9",
"Cookie: _sp_id.dc78=92abbc19-37fb-460d-aed9-75b5b7c69e3c.1681358903.1.1681361795.1681358903.a7e4f055-747c-4c7a-9f1c-ca5eb51c76a6",
"application/json"
],
"userId": "9ef197ec-7033-45d9-bdef-8625a50ab7b0"
}
},
"eventType": "page_ping",
"schema": "iglu:com.snowplowanalytics.snowplow/page_ping/jsonschema/1-0-0",
"contexts": [
"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",
"iglu:org.w3/PerformanceTiming/jsonschema/1-0-0"
],
"event": {
"app_id": "try-snowplow",
"platform": "web",
"etl_tstamp": "2023-05-07T18:33:56.329Z",
"collector_tstamp": "2023-05-07T18:33:56.294Z",
"dvce_created_tstamp": "2023-05-07T18:33:56.602Z",
"event": "page_ping",
"event_id": "e7b46ef2-d3e8-47cd-9e71-71a44ffcb909",
"txn_id": null,
"name_tracker": "try",
"v_tracker": "js-3.3.1",
"v_collector": "snowplow-micro-1.6.0-stdout$",
"v_etl": "snowplow-micro-1.6.0",
"user_id": null,
"user_ipaddress": "172.17.0.1",
"user_fingerprint": null,
"domain_userid": "502b5559-b365-4709-8d56-c51792f0a6b1",
"domain_sessionidx": 2,
"network_userid": "9ef197ec-7033-45d9-bdef-8625a50ab7b0",
"geo_country": null,
"geo_region": null,
"geo_city": null,
"geo_zipcode": null,
"geo_latitude": null,
"geo_longitude": null,
"geo_region_name": null,
"ip_isp": null,
"ip_organization": null,
"ip_domain": null,
"ip_netspeed": null,
"page_url": "http://localhost/snowplow/",
"page_title": "Sitecore CDP - Boxever",
"page_referrer": null,
"page_urlscheme": "http",
"page_urlhost": "localhost",
"page_urlport": 80,
"page_urlpath": "/snowplow/",
"page_urlquery": null,
"page_urlfragment": null,
"refr_urlscheme": null,
"refr_urlhost": null,
"refr_urlport": null,
"refr_urlpath": null,
"refr_urlquery": null,
"refr_urlfragment": null,
"refr_medium": null,
"refr_source": null,
"refr_term": null,
"mkt_medium": null,
"mkt_source": null,
"mkt_term": null,
"mkt_content": null,
"mkt_campaign": null,
"contexts": {
"schema": "iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",
"data": [
{
"schema": "iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",
"data": {
"id": "113ce6cd-95ce-46f2-a5a5-f868588f1420"
}
},
{
"schema": "iglu:org.w3/PerformanceTiming/jsonschema/1-0-0",
"data": {
"navigationStart": 1683484364361,
"redirectStart": 1683484364371,
"redirectEnd": 1683484364385,
"fetchStart": 1683484364385,
"domainLookupStart": 1683484364385,
"domainLookupEnd": 1683484364385,
"connectStart": 1683484364385,
"secureConnectionStart": 0,
"connectEnd": 1683484364385,
"requestStart": 1683484364388,
"responseStart": 1683484364495,
"responseEnd": 1683484364496,
"unloadEventStart": 0,
"unloadEventEnd": 0,
"domLoading": 1683484364502,
"domInteractive": 1683484364920,
"domContentLoadedEventStart": 1683484364920,
"domContentLoadedEventEnd": 1683484364924,
"domComplete": 1683484366587,
"loadEventStart": 1683484366588,
"loadEventEnd": 1683484366599
}
}
]
},
"se_category": null,
"se_action": null,
"se_label": null,
"se_property": null,
"se_value": null,
"unstruct_event": null,
"tr_orderid": null,
"tr_affiliation": null,
"tr_total": null,
"tr_tax": null,
"tr_shipping": null,
"tr_city": null,
"tr_state": null,
"tr_country": null,
"ti_orderid": null,
"ti_sku": null,
"ti_name": null,
"ti_category": null,
"ti_price": null,
"ti_quantity": null,
"pp_xoffset_min": null,
"pp_xoffset_max": null,
"pp_yoffset_min": null,
"pp_yoffset_max": null,
"useragent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36",
"br_name": null,
"br_family": null,
"br_version": null,
"br_type": null,
"br_renderengine": null,
"br_lang": "en-US",
"br_features_pdf": null,
"br_features_flash": null,
"br_features_java": null,
"br_features_director": null,
"br_features_quicktime": null,
"br_features_realplayer": null,
"br_features_windowsmedia": null,
"br_features_gears": null,
"br_features_silverlight": null,
"br_cookies": true,
"br_colordepth": "24",
"br_viewwidth": 1422,
"br_viewheight": 632,
"os_name": null,
"os_family": null,
"os_manufacturer": null,
"os_timezone": "Asia/Calcutta",
"dvce_type": null,
"dvce_ismobile": null,
"dvce_screenwidth": 1280,
"dvce_screenheight": 720,
"doc_charset": "UTF-8",
"doc_width": 1415,
"doc_height": 3278,
"tr_currency": null,
"tr_total_base": null,
"tr_tax_base": null,
"tr_shipping_base": null,
"ti_currency": null,
"ti_price_base": null,
"base_currency": null,
"geo_timezone": null,
"mkt_clickid": null,
"mkt_network": null,
"etl_tags": null,
"dvce_sent_tstamp": "2023-05-07T18:33:56.610Z",
"refr_domain_userid": null,
"refr_dvce_tstamp": null,
"derived_contexts": {},
"domain_sessionid": "058aad71-c270-4696-8799-4d78bb04052d",
"derived_tstamp": "2023-05-07T18:33:56.286Z",
"event_vendor": "com.snowplowanalytics.snowplow",
"event_name": "page_ping",
"event_format": "jsonschema",
"event_version": "1-0-0",
"event_fingerprint": null,
"true_tstamp": null
}
}
]
then how can i send the domainUserInfo to page ping events (to run my abandoned session logic) ?
Thanks