This is an automated email from the ASF dual-hosted git repository.
poorejc pushed a commit to branch FLAGON-344
in repository https://gitbox.apache.org/repos/asf/incubator-flagon.git
The following commit(s) were added to refs/heads/FLAGON-344 by this push:
new 962c70b [FLAGON-378] WIP updates
962c70b is described below
commit 962c70b9568560c2d8a3518101e3d2f058d2b1af
Author: poorejc <[email protected]>
AuthorDate: Sun Apr 21 23:06:07 2019 -0400
[FLAGON-378] WIP updates
---
site/_docs/useralejs/modifying.md | 72 +++++++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
diff --git a/site/_docs/useralejs/modifying.md
b/site/_docs/useralejs/modifying.md
index 349f99b..754ea8d 100644
--- a/site/_docs/useralejs/modifying.md
+++ b/site/_docs/useralejs/modifying.md
@@ -4,3 +4,75 @@ component: useralejs
permalink: /docs/useralejs/modifying
priority: 11
---
+
+# UserALE.js Example
+
+This directory provides
+ * example usage for UserALE.js within a simple HTML Webpage,
+ * how users can expect to log UserALE events, and
+ * what log events looks like within a simple UserALE logging server.
+
+## Prerequisites
+
+Please see the
[Prerequsites](https://github.com/apache/incubator-flagon-useralejs#prerequsites)
+
+## Running the Logging Server
+
+Ensure that you have [node.js](https://nodejs.org/) installed. Then run:
+
+```
+npm run example:watch
+```
+
+## Running the Example
+
+Open index.html in your favorite html editor (Notepad++,Brackets,etc.). Modify
the "src" line of the UserALE.js script tag so that it
+refers to the filepath of your useralejs-1.0.0.min.js script
("file:///...[your file path].../build/userale-1.0.0.min.js").
+
+Save the index.html file, then open index.html in your browser (you can drag
it directly into a tab). You will see a very simple HTML Webpage with a button
labeled, "Click Me!".
+
+When you click the button, the events will be logged to the server (in
memory), and will print to your terminal. These UserALE.js logs look similar to
the following:
+
+```
+
+[ { target: 'body',
+ path: [ 'body', 'html' ],
+ clientTime: 1504287557492,
+ location: { x: 0, y: 0 },
+ type: 'keydown',
+ userAction: true,
+ details: null,
+ userId: 'example-user',
+ toolVersion: '1.0.0',
+ toolName: 'Apache UserALE.js Example',
+ useraleVersion: '1.0.0' },
+ { target: '#document',
+ path: [ '#document' ],
+ clientTime: 1504287558304,
+ location: { x: 0, y: 0 },
+ type: 'blur',
+ userAction: true,
+ details: { window: true },
+ userId: 'example-user',
+ toolVersion: '1.0.0',
+ toolName: 'Apache UserALE.js Example',
+ useraleVersion: '1.0.0' },
+ { target: '#document',
+ path: [ '#document' ],
+ clientTime: 1504287558304,
+ location: { x: 0, y: 0 },
+ type: 'blur',
+ userAction: true,
+ details: null,
+ userId: 'example-user',
+ toolVersion: '1.0.0',
+ toolName: 'Apache UserALE.js Example',
+ useraleVersion: '1.0.0' },
+ ...
+]
+
+```
+
+## Contributing
+
+Contributions are welcome! Simply [submit an issue
report](https://issues.apache.org/jira/browse/FLAGON) for problems you
encounter or a pull request for your feature or bug fix. The core team will
review it and work with you to incorporate it into UserALE.js.
\ No newline at end of file