-
Documentation - 5 10) Request your first context by simply accessing : http://localhost:8181/context.js?sessionId=1234 11) If something goes wrong, you should check the logs in ./data/log/karaf.log. If FIRST CONTEXT You can retrieve a context using curl like this : curl http://localhost:8181/context.js?sessionId=1234 This will retrieve a JavaScript script that contains a cxs object that contains the If you need this data, you must send a JSON object to configure the resulting output of the context.js(on) servlet. Here is an example that will retrieve all the session and profile properties, as well
0 码力 |
158 页 |
3.65 MB
| 1 年前 3
-
URL: http://localhost:8181/index.html This test page will trigger the loading of the /context.js script, which will try to retrieving the user context or create a new one if it doesn’t exist yet getElementsByTagName('script')[0]; g.type='text/javascript'; g.defer=true; g.async=true; g.src=u+'context.js'; s.parentNode.insertBefore(g,s); })(); 2.2. GETTING STARTED WITH UNOMI We will first Unomi server using the /context.json or /context.js URLs, respectively. Below is an example of asynchronously loading the initial context using the javascript
0 码力 |
32 页 |
477.20 KB
| 1 年前 3
-
it is safe. 10) Request your first context by simply accessing : http://localhost:8181/cxs/context.js?sessionId=1234 11) If something goes wrong, you should check the logs in ./data/log/karaf.log . If type="text/javascript" src="/tracker/unomi-web-tracker.min.js"> JAVASCRIPT JAVASCRIPT 2.4.2. CREATING A SCOPE TO COLLECT com/package/apache-unomi-tracker Here’s an example on how to use it: You can then simply use it in your JS code using something like this: