Set up reports and mailings on the results of accessibility checks
You can:
- set up mailings on a separate check. You can receive mailings to e-mail, phone or via HTTP requests. You can select the desired event - the result of the check - at which the mailing will be sent, and specify the frequency of sending the mailing;
- to set up a weekly summary report of all inspections for the week. The report comes to your email every Monday and contains information about all checks performed over the last seven days.
You can also track the current status of checks on the public statistics page.
Add a contact
You can receive check mailings by e-mail, SMS to your phone or via HTTP requests. You can receive mailings by e-mail and HTTP free of charge, for SMS mailings you need to buy an SMS package.
Email can also be used to receive a weekly report.
Email
Phone
HTTP request
-
In the Dashboard, from the top menu, click Products and select Check Availability.
-
Go to Reports and mailings → Contacts tab.
-
Click Add Contact.
-
Enter the name of the contact, it will only appear in the control panel.
-
Select the contact type - Email.
-
Enter your mailing address.
-
Optionally, to send newsletters only at certain times, check the Limit time of sending newsletters checkbox and specify the time of sending in the required time zone.
-
Click Add.
-
An e-mail with a confirmation link will be sent to the specified e-mail address. To confirm your e-mail, open the link from the e-mail in any browser.
-
In the Dashboard, from the top menu, click Products and select Check Availability.
-
Go to Reports and mailings → Contacts tab.
-
Click Add Contact.
-
Enter the name of the contact, it will only appear in the control panel.
-
Select the contact type - Phone.
-
Enter your phone number.
-
Optionally, to send newsletters only at certain times, check the Limit time of sending newsletters checkbox and specify the time of sending in the required time zone.
-
Click Add.
-
Create a php file, such as log.php, in the directory with your site.
-
Add some code to the script to test it:
<?php
echo "<response>";
?>Specify
<response>- the expected response is5ca8ada3938381ec79e881132b1fa3dac3. -
In the Dashboard, from the top menu, click Products and select Check Availability.
-
Go to Reports and mailings → Contacts tab.
-
Click Add Contact.
-
Enter the name of the contact.
-
Select the contact type - HTTP.
-
In the HTTP field, add the absolute address of the link to the file you created in step 1, for example,
http://domain.com/log.php. -
Click Verify.
-
The expected response that you added to the file in step 2 will appear in the dashboard.
-
Optionally, to send newsletters only at certain times, check the Limit time of sending newsletters checkbox and specify the time of sending in the required time zone.
-
Click Add.
-
Modify the php file and add a working script to it. You can use the example script.
Example script
This script sends a message to Telegram if a new entry appears in the audit log. You can view the audit log in the control panel: in the top menu, click Products → Accessibility Check → Audit Log tab.
-
Start a dialog with the bot from your account and get a list of updates for your bot:
https://api.telegram.org/bot<token>/getUpdatesSpecify
<token>- the token to access your bot via API, which you received when creating the bot. -
Get the chat ID - copy the value of
the chat_idparameter. -
Create a
log.phpfile. -
Add the following script to the file:
<?php
$file_get = $_SERVER["DOCUMENT_ROOT"] . "/modules/log/get.log";
if (!empty($_GET)) {
$fw = fopen($file_get, "a");
fwrite($fw, "GET " . var_export($_GET, true));
fclose($fw);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
"https://api.telegram.org/bot<token>/sendMessage?chat_id=<chat_id>&text='Новая запись в журнале проверок: <url>'");
$result=curl_exec($ch);
curl_close($ch);
}
?>Specify:
<chat-id>- The chat ID or username of the user to whom you want to send a message;<token>- Telegram bot key (token) of the form864190220:AAGY3To77NuySjaGmupS7PfEQy952V08QOA;<url>- link to a file of the formhttp://test-http-get.ru/modules/log/get.log.
-
Create a
logdirectory in the root directory of your site. -
In the directory, create a file named
get.logwhere the log of GET requests will be saved. -
In the same directory, place the
log.phpfile created in step 3.
Set up verification mailings
-
Make sure that you have added the contacts for whom you want to set up mailings. You can view the list of added contacts in the control panel: in the top menu, click Products → Availability Checking → Reports and Newsletters.
-
In the Dashboard, from the top menu, click Products and select Check Availability.
-
Open the Checks tab.
-
Open the Validation page → the Newsletters tab.
-
Check the contacts to which you want to send newsletters. All verification mailings will be sent to all the contacts you have marked.
-
Click New Newsletter.
-
Configure the mailing parameters:
7.1 Select which event - the result of the check request you want to track.
7.2 Select when to inform about the event (send a mailing) - immediately or after several consecutive requests that return the same event.
7.3 Select the frequency of informing, e.g. no more than one mailing per minute.
-
If you do not want to receive notification that the check result has changed to successful, uncheck the Notify about recovery checkbox. Recovery notifications are not sent at the moment of recovery, but at the frequency you specified in step 7. For example, if the server recovered in a minute, but you specified the frequency of notification once an hour, the recovery notification will come one hour after the failure notification.
-
Click .
-
If you selected contacts with a phone number in step 5, make sure you have a SMS package: in the top menu, click Products → Check availability → Reports and mailings → in the upper right corner, see the number of remaining SMS. To purchase additional SMS, click Order SMS, specify the quantity and click Pay for Service.
Customize weekly report
All default checks are added to a free weekly report that is emailed on Mondays. The report contains the results of all checks for the last seven days. You can remove a check from the report when you create a check or remove a check from the report after it is created.
- In the dashboard, from the top menu, click Products and select Check Availability.
- Go to the Reports and Newsletters section.
- Open the Reports tab.
- In the Weekly Report row, make sure the report is enabled.
- Check the e-mail addresses to which you want the report to be sent. If the desired address is not on the list, add it to your contacts and repeat steps 1-4.