Giter Site home page Giter Site logo

sapi's Introduction

SAPI

The statistics API Drupal 8 module is intended simplify and centralize event recording (tracking) and statistical evaluations of events, and to make it easy to feed that data back into Drupal

The module can be found at http://drupal.org/project/sapi

This repository main branch corresponds to the 3.x module effort, as seen in drupal.org

Consider also checking out our demo SAPI extension module: https://github.com/james-nesbitt/sapi-demo

Current status

The core 3.x functionality works well, and is considered reliable, but it quite abstract, and does little on it's own.

The submodule: sapi_entity_interaction effectively tracks all user interactions with entities, which can be used to build views based on those interactions (some demo views exaist already in the module)

###Incoming modules:

sapi_user_journey

Track a user's journey from page to page of your site, to see what navigation is commin, and what elements are not used.

to use

To install the sapi module into your site, use the typical process:

  • download the package to modules/contrib/
  • use composer require

Site admins

  • The core moduile provides some administrative pages to enable and disable handler plugins /admin/config/sapi
  • The data storage custom entitiy can be confiugred and managed at admin/strucutre/sapi

developers

The most common ay to extend sapi is to write handcler plugins, and triggers

white a new trigger when you want to send data to be tracked:

  1. write come custom code wherever you want to start a trigger
  2. incllude the dispatcher service in scope
  3. include the ActionTypePluginManager in scope
  4. create an action (ActionType plugin) instance using the plugin manager
  5. dispatch the action using the dispatcher
  • choose with actiontype plugin you want to use, based on whhat data you need to send. Perhaps you will need to creata a new plugin.

handle a SAPI event with a new response

  1. create a new handler plugin

store/retriecve SAPI data

SAPI data is typically stored using the custom content entity provided in the submodule "sapi_data". You can interact with this data using any entity applications such as views.

TO join us

Come and visit out Trello board: https://trello.com/b/fiBWGqdo/sapi2

sapi's People

Contributors

james-nesbitt avatar maijs avatar laurisigaunis avatar guncha25 avatar

Watchers

 avatar James Cloos avatar  avatar  avatar Irīna Rozīte avatar  avatar

Forkers

henrijs guncha25

sapi's Issues

Make ActionType plugins context aware

To declare which external data structures are required for ActionType plugins to work properly, it may be beneficial to add implementation of ContextAwarePluginInterface to said plugins. It will allow define data structure dependencies in plugin annotation. Example:

@ActionType(
  // ...
  context = {
    "node" = @ContextDefinition("entity:node", label = @Translation("Node"), required = FALSE)
  }
)

See how UserRole class does it.
See ContextAwarePluginInterface.php

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.