openeuropa / oe_webtools

Drupal module providing integration with several Webtools services
European Union Public License 1.2
6 stars 12 forks source link

Webtools Analytics compliancy with new Europa Analytics Platform #194

Open dhamaris opened 2 years ago

dhamaris commented 2 years ago

Hello, I am using Drupal 9.3 and was given the necessary snippets to upgrade to cck2 and to new europa analytics service. I just found about these oe_webtools modules and installed them, but the code does not match: When I install the module europa analytics, the following code is generated:

<script type="application/json">
{
  "utility":"piwik",
  "siteID":"b56b05cd-e693-46f0-ae3f-1f540c475b23",
  "sitePath":["euromod-web.jrc.ec.europa.eu"],
   "instance":"ec"
  }
</script>

  But the snippet should have "analytics" under "utility", right?

 <script type="application/json">
       {
    "utility":"analytics",
        "siteID":"b56b05cd-e693-46f0-ae3f-1f540c475b23",
        "sitePath":["euromod-web.jrc.ec.europa.eu"],
        "instance":"ec"
        }
      </script>

What does this mean? It is ok like that in the module? Or does the module not provide support for new europa analytics system yet?

Thank you

alexboss commented 1 week ago

Dear colleagues, this is Alexandre from Webtools team.

Indeed, we can confirm the "utility" should be set to "analytics" instead of "piwik".

"piwik" was used at the very beginning but has been changed for "analytics" to be more generic, ditch a specific product name, be aligned with the Europa Analytics teams, and consistent with the $wt.analytics API.

The Webtools documentation has been updated accordingly: https://webgate.ec.europa.eu/fpfis/wikis/display/webtools/Europa+Analytics

The standard value for the parameter "utility" is "analytics" . However, it's possible to encounter the parameter "utility" with the value "piwik". Both are valid, nevertheless "piwik" is deprecated and kept for historical reasons.

It is recommended to use the standard value "analytics" (especially to be aligned and consistent with the name of the API $wt.analytics).

Thank you and best regards.

Alexandre - DIGIT WEBTOOLS