SDG - Matomo plugin to use for sending data to Single Digital Gateway.

Installation

Download and install the plugin as you normally do.

Settings

general_settings.png

Set SDG environment

Here you can set Testing (acceptance) or Production environment. Testing is if you would like to test the setup, or if you are running a test instance.

Date to send SDG from the previous month

We recommend using the second of the month (default), as the plugin uses archived data, and the plugin try to send your data as soon as possible on the date you set, you should send at least the second, as all your data may be not be archived yet.

Add API settings to a measurable (website etc.)

Every website uses separate settings for SDG, as you could have different API keys for sites, so we need to add them. Go to the website you want to add URL:s and API-keys for. Website -> Manage.

manage.png

Add the needed information in the fields:

manage_settings.png

You must at least provide an API-token and one report URL. Now you are all set to start sending data to the Single Digital Gateway.

Report data

Information about what is going to be sent, or have been sent, to the gateway you can see in the SDG report (you can use the monthly view in the Matomo UI to see the report per month).

statistics.png

How do I … ?

Send historical data

Use the console. As SDG-plugin uses archived data, you need to invalidate reports historically for the SDG plugin, like (for site id 1):

./console core:invalidate-report-data --dates=2024-08-01,2024-08-31 --sites=1 --plugin=SDG

After that you can wait until Matomo has archived your data, or you could archive manually:

./console core:archive --force-date-range=2024-08-01,2024-08-31 --force-idsites=1

The next step is to create the report to be sent (this is normally done automatically), the recommendation is to send in one report per month:

./console sdg:send-statistics-on-information-services --idsite=1 --from=2024-08-01 --to=2024-08-31

This will output in the terminal what would be sent, to send it for real, add the send flag.

./console sdg:send-statistics-on-information-services --idsite=1 --from=2024-08-01 --to=2024-08-31 --send

You should get a successful output when this is done.

List sent reports?

In the Administration section, go to Single Digital Gateway -> Send status.

Successfully sent reports should have a response “200”, if not, you can try to resend them by pushing the resend icon. Though, we recommend to use the console to send the reports, for better debugging output if something is wrong. A new uuid for identifying the reports will be created.

Example:

./console sdg:send-statistics-on-information-services --idsite=1 --from=2024-08-01 --to=2024-08-31 --send
  • general settings

  • manage

  • manage settings

  • statistics


Please share