Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: short-url:visits exports different columns than web client #2311

Open
UCI-MIND-IT opened this issue Dec 17, 2024 · 0 comments
Open

CLI: short-url:visits exports different columns than web client #2311

UCI-MIND-IT opened this issue Dec 17, 2024 · 0 comments
Labels

Comments

@UCI-MIND-IT
Copy link

Shlink version

4.3.1

PHP version

8.2.26

How do you serve Shlink

Self-hosted Apache

Database engine

MariaDB

Database version

10.11.6

Current behavior

The CLI command short-url:visits does not return the same columns as the web client's "Export" feature (Shlink web client version 4.3.0):

Image

Columns returned from the CLI: "Referer","Date","User agent","Country","City"

Columns returned from the web client's CSV export: "date","potentialBot","userAgent","os","browser","referer","country","city","latitude","longitude","visitedUrl","type".

We checked the Shlink CLI documentation and the command's help text using the -h flag, but couldn't find any information on configuring the types (columns) of visit data to export. Both our Shlink database server and self-hosted Shlink web client server are running on the same Linux distro using Apache.

Expected behavior

It would be ideal if data exports using shell commands (individually or automated via shell scripts) could provide at least the same parity of data as the web client's "Export" feature.

Minimum steps to reproduce

  1. Create a short link via any method
  2. Generate visit stats for this short link by visiting it several times
  3. On the Shlink database server, use the CLI to produce the stats for this short link: /path/to/shlink/bin/cli short-url:visits testshlink > out.txt
  4. On the web client, create an export of the same short link's stats (see screenshot in "Current behavior")
  5. Observe that the columns from the CLI export (head out.txt) are different from the columns in the web client's export
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

2 participants