Skip to content

Commit e92794a

Browse files
committed
update readme files for hooks and times of day
1 parent afd822c commit e92794a

File tree

2 files changed

+101
-0
lines changed

2 files changed

+101
-0
lines changed

plugins/hooks/README.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,73 @@ hooks/ # Main hooks plugin directory
6262
```bash
6363
npm install
6464
```
65+
66+
## Using Hooks
67+
68+
First, ensure that Hooks is enabled. In the Sidebar, navigate to Management > Feature Management and switch on the Hooks toggle.
69+
70+
## Creating a New Hook
71+
72+
To create a new Hook in the Countly Hooks Plugin, follow these steps:
73+
74+
### Step 1: Start a New Hook
75+
76+
- Click on the **+ New Hook** button located in the top right corner of the default view. A new drawer will open where you’ll need to fill out the following fields.
77+
78+
### Step 2: Fill in Hook Details
79+
80+
1. **Hook Name**: Enter a concise and descriptive name for your Hook. This field is required and should adhere to SDK naming limitations.
81+
2. **Description** (optional): Provide a brief explanation of the Hook’s purpose. This can help your colleagues understand why it was created. Avoid long descriptions and special characters.
82+
3. **Source App**: Select the application where the Hook will apply. You can use the search bar to find your app, but only one app can be chosen per Hook. Click on **Next Step** to proceed to trigger selection.
83+
84+
### Step 3: Select the Trigger Type
85+
86+
From the dropdown, choose a trigger type for your Hook. Options include:
87+
88+
- **Tracked Data**
89+
- **Internal Actions**
90+
- **API Endpoint**
91+
92+
#### For Tracked Data
93+
94+
- Choose a specific data point from the list or dropdown.
95+
- Set a filtering rule if needed; you may add multiple conditions.
96+
97+
#### For Internal Actions
98+
99+
- Select a trigger from the dropdown.
100+
- Depending on the chosen trigger, specify the details using the subsequent dropdown (e.g., select a specific cohort from the list).
101+
102+
#### For API Endpoint
103+
104+
- Choose a trigger from the dropdown.
105+
- Specify further using the new dropdown that appears (e.g., select a cohort).
106+
107+
### Step 4: Set up a Recurring Trigger (Optional)
108+
109+
Select one of the following frequencies for the trigger:
110+
111+
- **Every hour** (includes time zone selection)
112+
- **Every day** (includes time zone selection)
113+
- **Every week** (select day of the week, hour, and time zone)
114+
- **Every month** (select day of the month from 1 to 28, hour, and time zone)
115+
116+
Then, specify when the trigger should run.
117+
118+
### Step 5: Choose an Action Type
119+
120+
Choose an action from the dropdown options:
121+
122+
- **Send Email**
123+
- **Make HTTP Request**
124+
- **Custom Code**
125+
126+
You can add multiple actions by clicking **Add Action**.
127+
128+
### Step 6: Test the Hook (Optional)
129+
130+
- To verify if the Hook functions as expected, click the **Test the Hook** button. For further guidance, refer to the “Testing a Hook” section below.
131+
132+
### Step 7: Save the Hook
133+
134+
After completing all fields, click **Save**. A success message will confirm that your Hook has been saved successfully.

plugins/times-of-day/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,34 @@ times-of-day/
5454
```bash
5555
npm install
5656
```
57+
58+
## Using Times of Day
59+
60+
The Times of Day feature allows you to analyze user activity based on specific time criteria. Follow these steps to effectively use this tool.
61+
62+
### Step 1: Selecting Criteria
63+
64+
- **Criteria Options**: Start by selecting a criteria from the **Dropdown Menu** at the top left. Available options include:
65+
- **Sessions**
66+
- **Events**
67+
- **Consent**
68+
- **Push Action**
69+
70+
- **Time Period**: Use the **Dropdown Menu** at the top right to specify a time range. This will automatically refresh the data chart and data table with the relevant activity details.
71+
72+
### Step 2: Understanding the Data Chart
73+
74+
- The **Data Chart** shows activity by **hour of the day** (in 24-hour format on the x-axis) and **day of the week** (on the y-axis).
75+
- **Colored circles** represent activity levels at each time and day intersection. The larger the circle, the higher the number of users.
76+
- You can download this chart as a **PNG image** by clicking the **Downward Arrow** button at the top right of the chart.
77+
78+
### Step 3: Understanding the Data Table
79+
80+
- Below the Data Chart is the **Data Table**, which provides the information in a detailed, tabular format with specific user counts.
81+
- The table includes:
82+
- **Hours**: Each hour of the day, in hourly segments.
83+
- **Days**: Columns for each day of the week showing the active user count per hour.
84+
85+
- You can export the table in **CSV, JSON, or XLSX** format by clicking the **Downward Arrow** button at the top right of the table.
86+
87+
This feature is ideal for visualizing and exporting user activity based on selected criteria and time frames for further analysis.

0 commit comments

Comments
 (0)