Giter Site home page Giter Site logo

open-web-analytics / owa-wordpress-plugin Goto Github PK

View Code? Open in Web Editor NEW
11.0 11.0 9.0 213 KB

The official integration plugin for adding Open Web Analytics tracking to WordPress websites and applications.

License: GNU General Public License v2.0

PHP 100.00%
openwebanalytics owa traffic-analysis webanalytics wordpress wordpress-plugin

owa-wordpress-plugin's Introduction

Open Web Analytics Server

Open Web Analytics is an open source alternative to commercial web analytics tools such as Google Analytics. This software allows you to stay in control of the data you collect about the user of your websites or applications.

This repository installs the OWA Server and Javascript tracking client which can easily be added to web pages.

Features

  • Track visitors, pageviews, e-commerce transactions, and configurable actions
  • Track unlimited number of websites using a single instance of OWA Server
  • First party Javascript tracker client
  • Reporting Dashboard/Portral
  • View and customize all reports
  • Generate Heatmaps
  • Generate "Domstream" session recordings
  • Geolocation of visitors
  • REST API for administration and data access
  • Multi user reporting interface
  • Extensible framework via custom modules

Requirements and Installation

See the technical requirements before you install OWA Server. A step by step installation guide will walk you through how to install OWA.

Documentation

See the wiki for documentation about the OWA Server and the Javascript Tracker client.

Issues & Support

Please read the troubleshooting guide before filing any issue or bug reports. Issue tickets without the necessary debug info will be closed automatically.

Development

To contribute to the Open Web Analytics for WordPress plugin you need to:

  1. Clone the repository
  2. Download and install Composer for managing PHP dependencies.
  3. Run composer install

Donate to this project

Open Web Analytics is free. However, we ask that you donate to the project if you need support. Your donation helps fund the development of this project.

Donate to the project here.

Copyright and License

This project is licensed under the GNU GPL, version 2 or later.

© Peter Adams.

owa-wordpress-plugin's People

Contributors

padams avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

owa-wordpress-plugin's Issues

Unable to configure Website ID - "There has been a critical error on this website..."

When first attempting to configure the WP plugin, I am not able to select the Website ID from the dropdown. I've provide all the other configuration information (API Key, Secret Auth, Endpoint URL). Hoping that I can then select the Website ID, I press Save and then the following error message is displayed in place of the dropdown:

"There has been a critical error on this website. Please check your site admin email inbox for instructions."

Once this happens, I am no longer able to save any changes due to lack of Save button. Deactivating and reinstalling the plug-in doesn't help.

OWA Plug-in Version: 2.1.1
OWA Server Version: 1.7.6
WordPress Version: 5.9.1

Both WordPress and OWA servers are running on Ubuntu (18.04 and 20.04 respectively).

If you'd like the values saved in WP for the owa_wp, please DM me and I will share.

The following email is sent to me by the site:

Error Details

An error of type E_ERROR was caused in line 270 of the file /var/www/html/wp-content/plugins/open-web-analytics/vendor/open-web-analytics/owa-php-sdk/src/OwaClient.php. Error message: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /var/www/html/wp-content/plugins/open-web-analytics/vendor/open-web-analytics/owa-php-sdk/src/OwaClient.php:270
Stack trace:
#0 /var/www/html/wp-content/plugins/open-web-analytics/vendor/open-web-analytics/owa-php-sdk/src/OwaClient.php(270): array_key_exists()
#1 /var/www/html/wp-content/plugins/open-web-analytics/vendor/open-web-analytics/owa-php-sdk/src/Sites/SitesClient.php(39): OwaSdk\OwaClient->makeRequest()
#2 /var/www/html/wp-content/plugins/open-web-analytics/owa-plugin.php(1192): OwaSdk\Sites\SitesClient->listSites()
#3 /var/www/html/wp-includes/class-wp-hook.php(307): owaWp_plugin->getSitesFromOwa()
#4 /var/www/html/wp-includes/plugin.php(189): WP_Hook->apply_filters()
#5 /var/www/html/wp-content/plugins/open-web-analytics/src/settings/fields/select.php(19): apply_filters()
#6 /var/www/html/wp-admin/includes/template.php(1743): owaWp\settings\fields\select->render()
#7 /var/www/html/wp-content/plugins/open-web-analytics/src/settings/page.php(428): do_settings_fields()
#8 /var/www/html/wp-content/plugins/open-web-analytics/src/settings/page.php(289): owaWp\settings\page->doTabbedSettingsSections()
#9 /var/www/html/wp-includes/class-wp-hook.php(307): owaWp\settings\page->renderPage()
#10 /var/www/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#11 /var/www/html/wp-includes/plugin.php(474): WP_Hook->do_action()
#12 /var/www/html/wp-admin/admin.php(259): do_action()
#13 {main}
thrown

WP Plugin fails in latest PHP 8.x versions

Before you open an issue:

OWA Version WP plugin: 2.1.5

PHP Version: 8.3.0 / 8.0.29 FPM

Webserver: Apache

Browser: Safari 16.5.2 / Firefox 116.0

Description

Upon login in into the admin, errors are reported (see latest part with the trace error logs)
it is still possible to continue into the web admin area by just going to any valid link of the portal.
No more errors are visible.

Possible Solution

Workaround is to disable Track WP Admin Pages and Track WP Admin Actions

Additional context

8.3.0 >> WP OWA
Fatal error: Uncaught ValueError: setcookie(): "path" option cannot contain ",", ";", " ", "\t", "\r", "\n", "\013", or "\014" in /installed-path/wp-content/plugins/open-web-analytics/vendor/open-web-analytics/owa-php-sdk/src/Tracker/State.php:373 Stack trace:
0 /installed-path/wp-content/plugins/open-web-analytics/vendor/open-web-analytics/owa-php-sdk/src/Tracker/State.php(373): setcookie('owa_v', 'cdh=>0|||vid=>', 2006506657, '/; SameSite=lax', '')
1 /installed-path/wp-content/plugins/open-web-analytics/vendor/open-web-analytics/owa-php-sdk/src/Tracker/State.php(201): OwaSdk\Tracker\State->createCookie('owa_v', 'cdh=>0|||vid=>', 2006506657, '/; SameSite=lax', NULL)
2 /installed-path/wp-content/plugins/open-web-analytics/vendor/open-web-analytics/owa-php-sdk/src/Tracker/State.php(167): OwaSdk\Tracker\State->persistState('v')
3 /installed-path/wp-content/plugins/open-web-analytics/vendor/open-web-analytics/owa-php-sdk/src/Tracker/TrackerClient.php(201): OwaSdk\Tracker\State->set('v', 'vid', false, 'cookie', true)
4 /installed-path/wp-content/plugins/open-web-analytics/vendor/open-web-analytics/owa-php-sdk/src/Tracker/TrackerClient.php(183): OwaSdk\Tracker\TrackerClient->setVisitorId(Object(OwaSdk\Tracker\TrackingEvent))
5 /installed-path/wp-content/plugins/open-web-analytics/vendor/open-web-analytics/owa-php-sdk/src/Tracker/TrackerClient.php(389): OwaSdk\Tracker\TrackerClient->manageState(Object(OwaSdk\Tracker\TrackingEvent))
6 /installed-path/wp-content/plugins/open-web-analytics/vendor/open-web-analytics/owa-php-sdk/src/Tracker/TrackerClient.php(475): OwaSdk\Tracker\TrackerClient->trackEvent(Object(OwaSdk\Tracker\TrackingEvent))
7 /installed-path/wp-content/plugins/open-web-analytics/owa-plugin.php(819): OwaSdk\Tracker\TrackerClient->trackAction('User Login', 'WordPress', 'admin-user')
8 /installed-path/wp-includes/class-wp-hook.php(310): owaWp_plugin->trackUserLoginAction('admin-user')
9 /installed-path/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
10 /installed-path/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
11 /installed-path/wp-includes/user.php(121): do_action('wp_login', 'admin-user', Object(WP_User))
12 /installed-path/wp-login.php(1241): wp_signon(Array, true)
13 {main} thrown in /installed-path/wp-content/plugins/open-web-analytics/vendor/open-web-analytics/owa-php-sdk/src/Tracker/State.php on line 373

Error with latest version of plugin and wordpress

ubunu 22, Wp 6.5.3 owa-plugin 2.1.15

PHP message: PHP Fatal error: Uncaught Error: Call to undefined method GuzzleHttp\Exception\ConnectException::hasResponse() in /var/www/xxx/wp-content/plugins/open-web-analytics/vendor/open-web-analytics/owa-php-sdk/src/OwaClient.php:211\nStack trace:\n

Uncaught Error: Interface 'Psr\Http\Message\RequestInterface' not found in /home/customer/...

I searched this site but wasn't sure what I was searching for. The error is not very clear as to what the issue is. It seems there is something missing, but when you look further down, it appears there is an error on line 15 of the owa_coreAPI.php. Let me know if, perhaps, I just missed something.

Fatal error: Uncaught Error: Interface 'Psr\Http\Message\RequestInterface' not found in /home/customer/www/gardening-diy.com/public_html/OWA/vendor/guzzlehttp/psr7/src/Request.php:15 Stack trace: #0 /home/customer/www/gardening-diy.com/public_html/OWA/vendor/composer/ClassLoader.php(571): include() #1 /home/customer/www/gardening-diy.com/public_html/OWA/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile('/home/customer/...') #2 [internal function]: Composer\Autoload\ClassLoader->loadClass('GuzzleHttp\Psr7...') #3 /home/customer/www/gardening-diy.com/public_html/OWA/owa_httpRequest.php(179): spl_autoload_call('GuzzleHttp\Psr7...') #4 /home/customer/www/gardening-diy.com/public_html/OWA/modules/base/widgetOwaNews.php(49): owa_http->getRequest('https://api.git...') #5 /home/customer/www/gardening-diy.com/public_html/OWA/owa_controller.php(280): owa_widgetOwaNewsController->action() #6 /home/customer/www/gardening-diy.com/public_html/OWA/owa_coreAPI.php(880): owa_controller->doAction() #7 /home/customer/www in /home/customer/www/gardening-diy.com/public_html/OWA/vendor/guzzlehttp/psr7/src/Request.php on line 15

Got 500 error when Tracking WordPress feed request

Wordpress debug log says:

[11-Jan-2022 13:52:16 UTC] Tracking WordPress feed request
[11-Jan-2022 13:52:16 UTC] PHP Fatal error:  Uncaught Error: Call to private method OwaSdk\Tracker\TrackerClient::makeEvent() from context 'owaWp_plugin' in /var/www/vhosts/example.com/blog.example.com/wp-content/plugins/open-web-analytics/owa-plugin.php:919
Stack trace:
#0 /var/www/vhosts/example.com/blog.example.com/wp-includes/class-wp-hook.php(303): owaWp_plugin->trackFeedRequest()
#1 /var/www/vhosts/example.com/blog.example.com/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
#2 /var/www/vhosts/example.com/blog.example.com/wp-includes/plugin.php(470): WP_Hook->do_action()
#3 /var/www/vhosts/example.com/blog.example.com/wp-includes/template-loader.php(13): do_action()
#4 /var/www/vhosts/example.com/blog.example.com/wp-blog-header.php(19): require_once('/var/www/vhosts...')
#5 /var/www/vhosts/example.com/blog.example.com/index.php(17): require('/var/www/vhosts...')
#6 {main}
  thrown in /var/www/vhosts/example.com/blog.example.com/wp-content/plugins/open-web-analytics/owa-plugin.php on line 919

Unable to configure Website ID in plugin

Description
I just successfully installed the OWA server. Everything seems to be working fine. The installation wizard completed successfully and I am able to navigate to the URL and log into the OWA instance.

While trying to connect the OWA server with my wordpress website, the plugin will not populate the drop down menu with the website ID. I am not sure why this is. I have went through the trouble shooting guide in the OWA wiki and none of the suggestions have been helpful for this issue.

I am running both the OWA server and the website over nginx on RockyLinux.

Below are a few lines from the error logs which may be helpful.

[NOTICE] Use of owa_client class is deprecated. Re-implement your tracker using OWA's PHP SDK.
[ERROR] OWA_DB_TYPE constant has not been set for some reason.

These errors are present immediately after installation.

I did try to install the PHP SDK, but I was unclear on how to properly pass the credentials to it. I did not understand the directions for creating a tracker.

Thank you for any assistance you can provide.

Edit: While continuing to try to fix the issue. I set the plugin option "Enable OWA" to "Off". This resulted in the error "There has been a critical error on this website. Please check your site admin email inbox for instructions."

This error persists even after reinstalling the plugin. There are no clear indications about what is wrong or how to fix it.

Here are the errors which were pushed to my email in regards to the plugin:

When seeking help with this issue, you may be asked for some of the following information:
WordPress version 6.1.1
Active theme: GeneratePress Child (version 0.1)
Current plugin: Open Web Analytics (version 2.1.5)
PHP version 7.4.30

Error Details

An error of type E_ERROR was caused in line 1190 of the file /var/www/.com/html/wp-content/plugins/open-web-analytics/owa-plugin.php. Error message: Uncaught Error: Call to a member function createSites() on string in /var/www/.com/html/wp-content/plugins/open-web-analytics/owa-plugin.php:1190
Stack trace:
#0 /var/www/.com/html/wp-includes/class-wp-hook.php(308): owaWp_plugin->getSitesFromOwa()
#1 /var/www/
.com/html/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#2 /var/www/.com/html/wp-content/plugins/open-web-analytics/src/settings/fields/select.php(19): apply_filters()
#3 /var/www/
.com/html/wp-admin/includes/template.php(1785): owaWp\settings\fields\select->render()
#4 /var/www/.com/html/wp-content/plugins/open-web-analytics/src/settings/page.php(428): do_settings_fields()
#5 /var/www/
.com/html/wp-content/plugins/open-web-analytics/src/settings/page.php(289): owaWp\settings\page->doTabbedSettingsSections()
#6 /var/www/.com/html/wp-includes/class-wp-hook.php(308): owaWp\settings\page->renderPage()
#7 /var/www/
.com/html/wp-includes/class-wp-hook.php(332): WP_

(censored my FQDN for privacy reasons)

"The site is experiencing technical difficulties." anter enabling owa plugin.

Describe the bug you encountered:

"The site is experiencing technical difficulties. Please check your site admin email inbox for instructions."
And HTTP 500 error form this plugin on browser console log.

How did you install owa-wordpress-plugin?

From WordPress plugin installer.

Tracking Issue
I enabled WordPress debug display true in wp-config.php and here is an error.

Deprecated: Required parameter $options follows optional parameter $params in /var/www/*****/wp-content/plugins/open-web-analytics/src/settings/field.php on line 31

Apache Error Log
[Fri Nov 19 00:58:26.100451 2021] [proxy_fcgi:error] [pid 764303:tid 140290527495936] [client ***.***.***.***:11334] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a member function createSites() on string in /var/www/*****/wp-content/plugins/open-web-analytics/owa-plugin.php:1191\nStack trace:\n#0 /var/www/*****/wp-includes/class-wp-hook.php(303): owaWp_plugin->getSitesFromOwa()\n#1 /var/www/*****/wp-includes/plugin.php(189): WP_Hook->apply_filters()\n#2 /var/www/*****/wp-content/plugins/open-web-analytics/src/settings/fields/select.php(19): apply_filters()\n#3 /var/www/*****/wp-admin/includes/template.php(1743): owaWp\\settings\\fields\\select->render()\n#4 /var/www/*****/wp-content/plugins/open-web-analytics/src/settings/page.php(428): do_settings_fields()\n#5 /var/www/*****/wp-content/plugins/open-web-analytics/src/settings/page.php(289): owaWp\\settings\\page->doTabbedSettingsSections()\n#6 /var/www/*****/wp-includes/class-wp-hook.php(303): owaWp\\settings\\page->renderPage()\n#7 /var/www/*****/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()\n#8 /var/www/*****/wp-includes/plugin.php

More Info
I use GNU/Linux Ubuntu 20.04 with Apache/2.4.41, MariaDB/10.5.13 and PHP 8.0.12.
The both OWA and WP are on the same VPS.

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.