Giter Site home page Giter Site logo

piwik-plugin-devicefeaturewebgl's People

Contributors

sgiehl avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

piwik-plugin-devicefeaturewebgl's Issues

Installation of the plugin doesn't work...

Hi @sgiehl
Very strange behaviour of the plugin (DeviceFeatureWebGL 4.0.1).

Symptoms

I activate the plugin.
No big problem immediately, but I don't see the WebGL entry in the Visitors>Software>Browser Plugins report table, whereas when I check the HTTP request (send by the AnonymousPiwikUsageMeasurement plugin), I do see the webgl=1 parameter.
After one hour or two, Matomo cannot track at all anymore:

ERROR Piwik\Tracker\Handler[2022-09-07 12:03:56 UTC] [95d4f]
Exception: /appli/matomo/core/Tracker/Db/Pdo/Mysql.php(237):
Error query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'config_webgl' in 'field list'
In query:
INSERT INTO matomo_log_visit (idvisitor, config_id, location_ip, idsite, profilable, visit_first_action_time, visit_goal_buyer, visit_goal_converted, visit_last_action_time, visitor_returning, visitor_seconds_since_first, visitor_seconds_since_order, visitor_count_visits, visit_entry_idaction_name, visit_entry_idaction_url, visit_exit_idaction_name, visit_exit_idaction_url, visit_total_actions, visit_total_interactions, visit_total_searches, referer_keyword, referer_name, referer_type, referer_url, location_browser_lang, config_browser_engine, config_browser_name, config_browser_version, config_client_type, config_device_brand, config_device_model, config_device_type, config_os, config_os_version, visit_total_events, visitor_localtime, visitor_seconds_since_last, config_resolution, config_cookie, config_flash, config_java, config_pdf, config_quicktime, config_realplayer, config_silverlight, config_windowsmedia, config_webgl, visit_total_time, location_country, location_provider)
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
Parameters: array (...)
[Query: ?action_name=LoginLdap%20ConfirmPassword&idsite=4&rec=1&r=060028&h=14&m=3&s=56&url=https%3A%2F%2Fdemo-anonymous.matomo.org%2FLoginLdap%2FconfirmPassword%2F%3FpluginName%3DDeviceFeatureWebGL%26nonce%3DXYZ%26redirectTo%3DXYZ&_id=a72781be537ac5ee&_idn=0&_refts=0&send_image=0&cookie=1&res=1920x1080&_cvar=%7B%221%22%3A%5B%22Access%22%2C%22superuser%22%5D%7D&pv_id=2FLgXO&fa_pv=1&fa_fp[0][fa_vid]=80xXdP&fa_fp[0][fa_fv]=1&webgl=1&pf_net=0&pf_srv=104&pf_tfr=32&pf_dm1=184, CLI mode: 0]

Configuration

Server

Single server
Matomo 4.10.1 (first installed version)
MySQL 8 with all schema write access (but LOAD DATA INFILE disabled)
Linux RedHat 8
PHP: 8.0.13 +fpm-fcgi
PHP INI max_execution_time: 0
PHP INI post_max_size: 8M
PHP INI max_input_vars: 1000

Plugins Activated

API, AbTesting 4.1.7, Actions, ActivityLog 4.0.5, AdminNotification 4.0.0, AdvertisingConversionExport 4.0.11, AjaxOptOut 1.4.0, Annotations, AnonymousPiwikUsageMeasurement 4.1.0, BotTracker 2.07, BulkTracking, Cohorts 4.0.5, Contents, CoreAdminHome, CoreConsole, CoreHome, CorePluginsAdmin, CoreUpdater, CoreVisualizations, CoreVue, CustomDimensions, CustomJsTracker, CustomReports 4.0.15, DBStats, Dashboard, DeviceDetectorCache 4.2.3, DevicePlugins, DevicesDetection, Diagnostics, Ecommerce, Events, ForceSSL 4.0.1, FormAnalytics 4.0.8, Funnels 4.0.11, GeoIp2, Goals, GoogleAnalyticsImporter 4.2.0, Heartbeat, HeatmapSessionRecording 4.4.3, IPReports 4.1.2, ImageGraph, Insights, Installation, Intl, InvalidateReports 4.1.0, JsTrackerForceAsync 4.0.0, KPIWidgets 1.1.1, LanguageToogle 0.3.5, LanguagesManager, Live, LogViewer 4.1.0, LoginLdap 4.5.0, MediaAnalytics 4.1.2, MobileAppMeasurable, Monolog, Morpheus, MultiChannelConversionAttribution 4.0.5, MultiSites, Overlay, PagePerformance, PrivacyManager, ProtectTrackID 2.0.0, Provider 4.0.3, Proxy, QueuedTracking 4.0.4, Referrers, ReferrersManager 4.0.2, RerUserDates 4.1.1, Resolution, RestrictLanguageSelection 4.0.0, RollUpReporting 4.0.3, SEO, SEOWebVitals 4.0.3, ScheduledReports, SearchEngineKeywordsPerformance 4.3.8, SecurityInfo 4.0.2, SegmentEditor, SitesManager, TagManager, TasksTimetable 4.0.2, TrackingSpamPrevention 4.1.2, Transitions, TreemapVisualization 4.0.1, UserCountry, UserCountryMap, UserId, UserLanguage, UsersFlow 4.0.4, UsersManager, VisitFrequency, VisitTime, VisitorInterest, VisitsSummary, WebsiteMeasurable, WhiteLabel 4.0.8

Note that QueuedTracking is activated, but not running in order to be able to see errors

How did I try to install it?

First try

  1. Matomo is running
  2. Add plugin files to Matomo
  3. Activate plugin through the plugins management UI

Second try

  1. (Unactivate the plugin, Delete plugin files, restart Apache)
  2. Matomo is running
  3. Add plugin files to Matomo
  4. Restart Apache
  5. Activate plugin through the plugins management UI
  6. Restart Apache

Third try

  1. (Unactivate the plugin, Delete plugin files, restart Apache)
  2. Matomo is running
  3. Add plugin files to Matomo
  4. do command php console plugin:activate DeviceFeatureWebGL

Matomo JS tracker file not updated

Matomo checks every hour if matomo.js needs to be regenerated. However this plugin's tracker.js is never added to it.

I was able to fix it by adding following method to Piwik\Plugins\DeviceFeatureWebG\DeviceFeatureWebGL class:

public function isTrackerPlugin()
{
    return true;
}

Possible bug in tracker.js

if ('object' === typeof window && 'object' === typeof window.Piwik) {

I forked your plugin and I cannot get the tracker.js code to work.
Could this be a bug?
As I understand it, these checks should be removed:

        if ('object' === typeof window && 'object' === typeof window.Piwik) {
            // do not initialize twice
            return;
        }

        if ('object' === typeof window && !window.Piwik) {
            // piwik is not defined yet
            return;
        }

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.