core-outline 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +43 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # Core&Outline
2
+
3
+ # Description
4
+ This package allows developers to connect to Core&Outline platform
5
+
6
+ # How to install
7
+
8
+ npm i core-outline
9
+
10
+ ### Starting a new instance
11
+
12
+ var core = new CoreOutline(<access_id>, <secret_key>)
13
+
14
+ ### To get the session details
15
+ var session_details = core.sessionDetails()
16
+
17
+ """
18
+ {
19
+ "session_id":"<session_id>",
20
+ }
21
+ """
22
+ ## Tracking user actions
23
+ # Update current page
24
+
25
+ Use this function when a user enters a page:
26
+
27
+ core.updatePage(session_details.session_id, <current_page_name>)
28
+
29
+ # To register a made purchase
30
+
31
+ Add this function to an onclick listener for when a user completes a transaction
32
+
33
+ core.targetReached(session_details.session_id)
34
+
35
+ # To register an action item click
36
+
37
+ This function is to be used when a user clicks on one of the recommended actions items
38
+
39
+ core.registerClick(session_details.session_id, <recommended_action_item_name>)
40
+
41
+
42
+
43
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-outline",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "NPM package for react",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.es.js",