Dexter  Goodwin

Dexter Goodwin

1661172360

Ackee-report: CLI tool To Generate Performance Reports Of Websites

ackee-report

CLI tool to generate performance reports of websites using the self-hosted analytics tool Ackee.

preview

πŸ‘‹ Introduction

ackee-report lets you create monthly website performance reports using your Ackee analytics data and either send them via email, generate a RSS feed or output it to a JSON file. It uses Ackee's Graphql API and can be configured to generate multiple reports for different websites, data ranges and recipients.

πŸš€ Get started

Install ackee-report globally via npm:

npm install ackee-report -g

ackee-report@latest requires Ackee >=v3.1.1. Use ackee-report@v1.1.3 for older versions of Ackee

After that ackee-report is ready to be used πŸŽ‰

βš™οΈ Configuration

On the first run ackee-report will ask you to input a few values:

  • ackee server / ACKEE_SERVER - the endpoint of your Ackee instance
  • ackee token / ACKEE_TOKEN - a permanent Ackee token (can be used instead of username and password, more info)
  • ackee username ACKEE_USERNAME - your Ackee username (more info)
  • ackee password ACKEE_PASSWORD - your Ackee password (more info)
  • email host / EMAIL_HOST - the domain of the email server (more info)
  • email port / EMAIL_PORT - the port of the email server (more info)
  • email username / EMAIL_USERNAME - the username to use with the email server (more info)
  • email password / EMAIL_PASSWORD - the password to use with the email server (more info)
  • email from / EMAIL_FROM - the from address to use (more info)

The configuration will be stored in your home directory under ~/.config/configstore/ackee-report.json and can be changed at any point.

Environment Variables

If you don't want to interact with ackee-report via the CLI interface, you can also specify each configuration option as an environment variable e.g. ACKEE_TOKEN=<token>

Ackee API authentication

ackee-report needs access to your Ackee instance via the API in order to get all the data it needs to generate the report. You can choose any of the two authentication methods below:

Username and password:

Enter your username and password you use to login to the Ackee UI on the first run of ackee-report or change it in the config file later.

ackee-report will then use them to create a temporary access token each time it runs and use it to query the Ackee API.

Permanent access token (recommended):

The recommended way of authenticating ackee-report is with a permanent access token (only available with Ackee v2.2.0 or later).

You will have to create one via the Ackee UI under Settings/Permanent Tokens, then click on New permanent token and give it a name (doesn't matter what).

Copy the permanent token id and enter it on the first run of ackee-report or add it to the config file under ackee.token later.

The same token will then be used each time ackee-report runs to query the Ackee API.

Email setup

If you want to send your report via email, you have to specify your email providers SMTP server and credentials, as well as the from option:

  • Host - smtp.example.com
  • Port - 465
  • Username - username@example.com
  • Password - password
  • From - username@example.com or Ackee <username@example.com>

Note: For port 465 ackee-report will use TLS when connecting to your email server, on all other ports it will use STARTTLS (#44)

Common providers:

Gmail

If you use gmail to send emails, use these values:

  • Host - smtp.gmail.com
  • Port - 465
  • Username - your gmail username (your email address)
  • Password - your gmail password or if you have 2FA enabled, an "Application Specific password"

SendGrid

If you use SendGrid to send emails, use these values:

  • Host - smtp.sendgrid.net
  • Port - 465
  • Username - apikey (everyone's username is apiKey)
  • Password - your API Key (generate one here)

MailGun

If you use SendGrid to send emails, use these values:

  • Host - smtp.mailgun.org
  • Port - 465
  • Username - postmaster@yourdomain.name
  • Password - get your password here

πŸ“š Usage

Usage: ackee-report <command> [options]

CLI tool to generate performance reports of websites using the self-hosted analytics tool Ackee.

Commands:
  email [options]             Generate report and send it via email
  json [options]              Query API for data and output it to JSON file
  html [options]              Generate report and output it to a HTML file
  rss|xml [options]           Generate report as a RSS feed
  domains|domain [titles...]  get domain id by title
  config                      output current config
  help [command]              display help for command

Options:
  General:
    -d, --domain <titles...>    specify domains by title
    -i, --id <ids...>           specify domains by id
    -r, --range <range>         specify data range (default: "month")
    -l, --limit <number>        limit number of list items (default: 3)
    -e, --events [type]         get event data (default: false)
    -v, --version               output the version number
    -h, --help                  display help for command

  Email:
    -t, --to <recipient...>     to whom the report should be sent

  RSS/JSON/HTML:
    -o, --output <file>         path to output file (default: "report.[xml/json/html]")

Example call:
  $ ackee-report email --domain example.com --to hello@example.com

If you want to send the report periodically, you have to setup a cron job which runs the command at a set interval (example below).

πŸ› οΈ Examples

Generate a report for one domain and send it via email

ackee-report email -d example.com -t hello@example.com

This will generate a report for the domain example.com and send it via email to hello@example.com.

Multiple domains and recipients

ackee-report email -d example.com example2.com -t hello@example.com hey@example2.com

Include events in report

ackee-report email -d all -t hello@example.com -e

Average event type

ackee-report email -d all -t hello@example.com -e avg

Custom range

You can specify the data range of the report with the -r/--range option:

ackee-report email -d example.com -t hello@example.com -r day

Available values: day/week/month/six_months.

Note: The total views/range value is calculated by counting the views of the last x days since the program ran. For the month range for example, it is not the number of views in the current month, but the number of views in the last 30 days.

Send the report periodically (cron)

To send a report periodically, for example every month at the 28th at 23:55 setup a cron job like this:

55 23 28 * * ackee-report email -d example.com -t hello@example.com >> /tmp/ackee-report.log 2>&1

Note: We use the 28th as running on the last day of the month is very complicated with cron and Ackee resets its data on the first day of each month.

Note: You may have to specify the actual path to ackee-report. In that case, replace ackee-report in the command above with the output of which ackee-report.

If you are not familiar with cron, here's a tutorial on how to get started.

To send multiple reports to different people, add them all as seperate cron jobs.

Generate RSS feed

You can generate a RSS feed/xml file instead of sending the report via email:

ackee-report rss -d example.com -o output.xml

Output the report to a JSON file

You can also save the report in a JSON file:

ackee-report json -d example.com -o output.json

Output the email report to a HTML file

You can also save the report, which is normally sent via email, directly to an HTML file:

ackee-report html -d example.com -o index.html

πŸ–ΌοΈ Screenshot

Full Report

πŸ’» Development

Issues and PRs are very welcome!

Run yarn lint or npm run lint to use eslint.

Please check out the contributing guide before you start.

To see differences with previous versions refer to the CHANGELOG.

❔ About

This library is an extension to the awesome privacy focused analytics tool Ackee.

Ackee was developed by @electerious, if you want to support him and the development of Ackee visit the Donate section on the Ackee repository.

Download Details:

Author: BetaHuhn
Source Code: https://github.com/BetaHuhn/ackee-report 
License: MIT license

#javascript #report #cli #privacy #analytics 

What is GEEK

Buddha Community

Ackee-report: CLI tool To Generate Performance Reports Of Websites
Dexter  Goodwin

Dexter Goodwin

1661172360

Ackee-report: CLI tool To Generate Performance Reports Of Websites

ackee-report

CLI tool to generate performance reports of websites using the self-hosted analytics tool Ackee.

preview

πŸ‘‹ Introduction

ackee-report lets you create monthly website performance reports using your Ackee analytics data and either send them via email, generate a RSS feed or output it to a JSON file. It uses Ackee's Graphql API and can be configured to generate multiple reports for different websites, data ranges and recipients.

πŸš€ Get started

Install ackee-report globally via npm:

npm install ackee-report -g

ackee-report@latest requires Ackee >=v3.1.1. Use ackee-report@v1.1.3 for older versions of Ackee

After that ackee-report is ready to be used πŸŽ‰

βš™οΈ Configuration

On the first run ackee-report will ask you to input a few values:

  • ackee server / ACKEE_SERVER - the endpoint of your Ackee instance
  • ackee token / ACKEE_TOKEN - a permanent Ackee token (can be used instead of username and password, more info)
  • ackee username ACKEE_USERNAME - your Ackee username (more info)
  • ackee password ACKEE_PASSWORD - your Ackee password (more info)
  • email host / EMAIL_HOST - the domain of the email server (more info)
  • email port / EMAIL_PORT - the port of the email server (more info)
  • email username / EMAIL_USERNAME - the username to use with the email server (more info)
  • email password / EMAIL_PASSWORD - the password to use with the email server (more info)
  • email from / EMAIL_FROM - the from address to use (more info)

The configuration will be stored in your home directory under ~/.config/configstore/ackee-report.json and can be changed at any point.

Environment Variables

If you don't want to interact with ackee-report via the CLI interface, you can also specify each configuration option as an environment variable e.g. ACKEE_TOKEN=<token>

Ackee API authentication

ackee-report needs access to your Ackee instance via the API in order to get all the data it needs to generate the report. You can choose any of the two authentication methods below:

Username and password:

Enter your username and password you use to login to the Ackee UI on the first run of ackee-report or change it in the config file later.

ackee-report will then use them to create a temporary access token each time it runs and use it to query the Ackee API.

Permanent access token (recommended):

The recommended way of authenticating ackee-report is with a permanent access token (only available with Ackee v2.2.0 or later).

You will have to create one via the Ackee UI under Settings/Permanent Tokens, then click on New permanent token and give it a name (doesn't matter what).

Copy the permanent token id and enter it on the first run of ackee-report or add it to the config file under ackee.token later.

The same token will then be used each time ackee-report runs to query the Ackee API.

Email setup

If you want to send your report via email, you have to specify your email providers SMTP server and credentials, as well as the from option:

  • Host - smtp.example.com
  • Port - 465
  • Username - username@example.com
  • Password - password
  • From - username@example.com or Ackee <username@example.com>

Note: For port 465 ackee-report will use TLS when connecting to your email server, on all other ports it will use STARTTLS (#44)

Common providers:

Gmail

If you use gmail to send emails, use these values:

  • Host - smtp.gmail.com
  • Port - 465
  • Username - your gmail username (your email address)
  • Password - your gmail password or if you have 2FA enabled, an "Application Specific password"

SendGrid

If you use SendGrid to send emails, use these values:

  • Host - smtp.sendgrid.net
  • Port - 465
  • Username - apikey (everyone's username is apiKey)
  • Password - your API Key (generate one here)

MailGun

If you use SendGrid to send emails, use these values:

  • Host - smtp.mailgun.org
  • Port - 465
  • Username - postmaster@yourdomain.name
  • Password - get your password here

πŸ“š Usage

Usage: ackee-report <command> [options]

CLI tool to generate performance reports of websites using the self-hosted analytics tool Ackee.

Commands:
  email [options]             Generate report and send it via email
  json [options]              Query API for data and output it to JSON file
  html [options]              Generate report and output it to a HTML file
  rss|xml [options]           Generate report as a RSS feed
  domains|domain [titles...]  get domain id by title
  config                      output current config
  help [command]              display help for command

Options:
  General:
    -d, --domain <titles...>    specify domains by title
    -i, --id <ids...>           specify domains by id
    -r, --range <range>         specify data range (default: "month")
    -l, --limit <number>        limit number of list items (default: 3)
    -e, --events [type]         get event data (default: false)
    -v, --version               output the version number
    -h, --help                  display help for command

  Email:
    -t, --to <recipient...>     to whom the report should be sent

  RSS/JSON/HTML:
    -o, --output <file>         path to output file (default: "report.[xml/json/html]")

Example call:
  $ ackee-report email --domain example.com --to hello@example.com

If you want to send the report periodically, you have to setup a cron job which runs the command at a set interval (example below).

πŸ› οΈ Examples

Generate a report for one domain and send it via email

ackee-report email -d example.com -t hello@example.com

This will generate a report for the domain example.com and send it via email to hello@example.com.

Multiple domains and recipients

ackee-report email -d example.com example2.com -t hello@example.com hey@example2.com

Include events in report

ackee-report email -d all -t hello@example.com -e

Average event type

ackee-report email -d all -t hello@example.com -e avg

Custom range

You can specify the data range of the report with the -r/--range option:

ackee-report email -d example.com -t hello@example.com -r day

Available values: day/week/month/six_months.

Note: The total views/range value is calculated by counting the views of the last x days since the program ran. For the month range for example, it is not the number of views in the current month, but the number of views in the last 30 days.

Send the report periodically (cron)

To send a report periodically, for example every month at the 28th at 23:55 setup a cron job like this:

55 23 28 * * ackee-report email -d example.com -t hello@example.com >> /tmp/ackee-report.log 2>&1

Note: We use the 28th as running on the last day of the month is very complicated with cron and Ackee resets its data on the first day of each month.

Note: You may have to specify the actual path to ackee-report. In that case, replace ackee-report in the command above with the output of which ackee-report.

If you are not familiar with cron, here's a tutorial on how to get started.

To send multiple reports to different people, add them all as seperate cron jobs.

Generate RSS feed

You can generate a RSS feed/xml file instead of sending the report via email:

ackee-report rss -d example.com -o output.xml

Output the report to a JSON file

You can also save the report in a JSON file:

ackee-report json -d example.com -o output.json

Output the email report to a HTML file

You can also save the report, which is normally sent via email, directly to an HTML file:

ackee-report html -d example.com -o index.html

πŸ–ΌοΈ Screenshot

Full Report

πŸ’» Development

Issues and PRs are very welcome!

Run yarn lint or npm run lint to use eslint.

Please check out the contributing guide before you start.

To see differences with previous versions refer to the CHANGELOG.

❔ About

This library is an extension to the awesome privacy focused analytics tool Ackee.

Ackee was developed by @electerious, if you want to support him and the development of Ackee visit the Donate section on the Ackee repository.

Download Details:

Author: BetaHuhn
Source Code: https://github.com/BetaHuhn/ackee-report 
License: MIT license

#javascript #report #cli #privacy #analytics 

sendy patel

sendy patel

1617086469

Online secure password generator

Create a secure password using our generator tool. Help prevent a security threat by getting a strong password today on hackthestuff.com.

#password #strong password generator #password generator #password generator tool #random generator tool #google generator tool

Rahim Makhani

Rahim Makhani

1620968589

Get a Bug Free and smooth website with website Maintenance

Having a website for your own firm or business is very important as it can benefit you in many ways like your users can get 24/7 service from your company, you can exchange your information, it can help you to expand your business in the market. One must also maintain their website to keep it bug free and updated.

Your website should be bug free because if there is any bug in your website it will slow down the performance of it and will not even work properly if this happens then there are chances that you may lose your customers.

Are you searching for a company that can provide you with website support and maintenance? Nevina Infotech is the best company that can help you with the maintenance and support, as we have enthusiastic web app developers who can help you to maintain your website.

#website maintenance services #website support and maintenance #website maintenance support #website maintenance packages #website maintenance company #website maintenance plans

Security Website Design

As web developers, we strive to meet your specific needs by creating a website that is user-friendly and remains relevant to the current design trends. This ensures that your website grabs the attention of your audience and keeps you ahead of your competitors.

DataIT Solutions team of experts works collaboratively to create ideas that can meet your requirements. Our Website Designing Company believes in High-Quality Professional Website Designing for your Security Website Designing. Our designers have experience in working on a wide array of projects, including websites of the next generation. We listen to your needs and then deliver.

Our Expertise includes:

  • Dot Net Development
  • PHP Development
  • HTML5 Development
  • IOS App Development
  • Android App Development
  • Website Security services

Our team of experts has the expertise, knowledge, and skills to take control and dominate the web design industry over the next couple of years. They are on hand to listen to your ideas, goals, and help you to have a website that is unique and works with your business and brand.

Looking for a better design? Need a professional web design?
Get in touch with our, Web Design Professional experts.

#security website design #security website designing #security website designer #website designer #website designing #website design

Construction website design in the UK

The right construction web design firm can help ensure that a website converts visitors into clients or leads effectively, even on the first visit, through the proper use of site elements to lead visitors through a sales funnel. With an effective website, construction companies can easily showcase their portfolios as they work to generate more effective leads.

DataIT Solutions offers customized construction website design companies in the UK and digital marketing services. Whether you’re establishing a new online location or your current site needs a redesign, we work with you to produce exactly what you want and need.

We approach every project differently - we analyze and research your business and customer type to build and design the website around our analysis and what we feel will work best for your website and business and as standard, a website will benefit from all of the standard content management features.

What’s included in your website design packages:

  • Hosting and coding
  • Graphic design
  • Advanced analytics tracking
  • Optimization for SEO
  • Existing content import
  • New content creation
  • Lead form creation and tracking
  • Website compatibility across all browsers and devices
  • Integration with social media pages
  • XML sitemap creation and submission
  • And more!

Ready to start your website design project?
We’ll consult with you to scope out your website build requirements.
Request a Consultation.!!

#construction website design in the uk #construction website design #construction website #website design in the uk #website design #website designer