Package org.silverpeas.looks.aurora.matomo

## Class MatomoInjectionFilter

- java.lang.Object
- - org.silverpeas.looks.aurora.matomo.MatomoInjectionFilter

- All Implemented Interfaces:
    `javax.servlet.Filter`

      public class MatomoInjectionFilter
      extends Object
      implements javax.servlet.Filter

  Servlet `Filter` responsible for injecting the Matomo tracking script into generated JSP pages.

  The script is dynamically built using a Silverpeas template and enriched with contextual information such as the current user, space and component identifiers.

  The injection is performed just before the closing `</body>` tag of the HTML response.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `MatomoInjectionFilter()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `doFilter​(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)` |
    `String` | `getCurrentUserId​(javax.servlet.http.HttpServletRequest request)` |
    `void` | `init​(javax.servlet.FilterConfig filterConfig)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface javax.servlet.Filter

      `destroy`

- - ### Constructor Detail

    - #### MatomoInjectionFilter

          public MatomoInjectionFilter()

  - ### Method Detail

    - #### init

          public void init​(javax.servlet.FilterConfig filterConfig)
                    throws javax.servlet.ServletException

      Specified by:
        `init` in interface `javax.servlet.Filter`
      Throws:
        `javax.servlet.ServletException`

    - #### doFilter

          public void doFilter​(javax.servlet.ServletRequest request,
                               javax.servlet.ServletResponse response,
                               javax.servlet.FilterChain chain)
                        throws IOException,
                               javax.servlet.ServletException

      Specified by:
        `doFilter` in interface `javax.servlet.Filter`
      Throws:
        `IOException`
        `javax.servlet.ServletException`

    - #### getCurrentUserId

          public String getCurrentUserId​(javax.servlet.http.HttpServletRequest request)