rainlab / googleanalytics-plugin Goto Github PK
View Code? Open in Web Editor NEWGoogle Analytics tracking and reporting.
License: Other
Google Analytics tracking and reporting.
License: Other
Dear Support,
I have installed Google Analytics Plugin, but still not receiving any hits/traffic when seeing it on Google Analytics Report.
Moreover, after see my page source code, i am not seeing any google analytics tracking code.
How to make sure/Test this plugin installation is Successfull ?
Note : i have uploaded json key, profile number and tracking id according to documentation.
Regards & Thanks,
Zuki
In some countries it is legaly required to use ip anonymization when using Google Analytics.
For now i override the default markup with my own partial but it would be of great help if this setting could be toggled on via the backend.
https://developers.google.com/analytics/devguides/collection/analyticsjs/ip-anonymization
I downloaded this great plugin. Account creation was successful too. In the development server, this plugin works well, except that browser statistics did not work. When I went to the production server, the error came from the widget:
ErrorException: count (): Parameter must be an array or an object that implements Countable in /.../.../.../.../htdocs/plugins/rainlab/googleanalytics/reportwidgets/browsers/partials/_widget.htm:12
In any case, I mention that the production server uses FactCGI (PHP 7.2).
I found this question and I want to put the same question: #74.
Is this question correct? I checked this "guzzlehttp/guzzle", it's up to date. I decided to temporarily deactivate this plugin, then this error will be thrown:
"Class 'Google_Client' not found" on line 42 of /.../.../.../.../htdocs/plugins/rainlab/googleanalytics/classes/Analytics.php
This is not normal or not? I could not think of what could have caused this error.
Do you have any thoughts on this? And how can it be improved?
Thank you in advance!
EDIT: In any case, I'll put a screenshot here, where the browser statistics widget is empty, it's in my development server...
If October CMS users are having this issue, tell them to disable their ad blocking extension.
I ran docker-compose up
and then when viewing logs, container logs stopped when pulling or downloading this plugin. Not sure why, this just happened to me recently.
I've added the details in the settings, all seems OK.
However the tracking code ID isn't being output in the generated Google tracking JS from the plugin component, there's literally a pair of empty quote marks.
Any thoughts? I think I may remove the component snippet and add manually until I hear a reply (swift response would be much appreciated). Thanks
Hy! I'm having a problem when I try to upload de Private Key, I'm getting this error: "Error uploading file: finfo::finfo(): Warning: string extension 'B' invalid"
Any idea?
I'm developing E-commerce system with October and using this plugin. If you can add lang folder and make texts and inputs dynamic -takes only 5-10 mins.- this plugin will be very useful for me and others. I can help editing the plugin btw. Thanks.
On each windget I have this error: Error refreshing the OAuth2 token, message: '{ "error" : "invalid_grant" }'
Can't investigate this fruther, but I get this on a fresh install when using the ReportWidgets by this component:
array_slice() expects parameter 1 to be array, null given
I think its due to the fact there is no data just yet.
Hi! I am having a permission issue with Rainlabs Blog (Viewing the Markdown, which I made a ticket for) and here the settings upload. I am clueless as to why this doesn't work!
setfacl
with Recursive Defaults, and Persistent Recursive Defaults for www-data:www-data
, this works fine for everything. I do not make any files 777
rather its g+rw at the maximum, public can only read.Might anyone know why this is happening?
Thank you I hope to get this cool plugin to work!
Hi.
Is it possible to apply application's timezone to traffic overview line chart?
I'm getting an "Invalid Access Error" alert/error when hitting the save button in the Settings -> Analytics section of October. It seems to only occur on my client, because my colleague's client works fine.
It seems to be client bound and not account bound, because the same user accounts give the same error on my client and my user accounts works fine on other clients.
Client: Safari
OS: OSX El Capitan
October: Build 351
Analytics Version: 1.2.1
When I fill out all fields, leave a few, or leave them all blank, I get the exact same thing when I click save:
Also, when trying to upload the private key, this pops up and I can't find any solution online. I've been trying to figure this out for the past couple hours.:
I definitely have full permissions on my uploads
directory as I have and still can upload files to that directory with absolutely no problem elsewhere, like in the "customize back-end" upload logo for example.
Any insight would be appreciated. The error codes aren't descriptive at all and I'm totally out of ideas.
I have uploaded the key but I think I missed something could you help me ?
I'm having this error on the dashboard widgets
set the JSON service account credentials using Google_Client::setAuthConfig or set the path to your JSON file with the "GOOGLE_APPLICATION_CREDENTIALS" environment variable and call Google_Client::useApplicationDefaultCredentials to refresh a token with assertion.
It's probably due to a mistake of mine but can't find it. I've followed the instructions.
I followed all the steps mentioned in the section on troubleshooting. But I still see the same error.
I'm running PHP 5.6 on Windows 2012 with IIS 8 and the line of php.ini is:
Any idea what could be happening ?
PHP info Says....
openssl
OpenSSL support enabled
OpenSSL Library Version OpenSSL 1.0.1i 6 Aug 2014
OpenSSL Header Version OpenSSL 1.0.1i 6 Aug 2014
Directive Local Value Master Value
openssl.cafile C:\Certificados\cacert.pem C:\Certificados\cacert.pem
openssl.capath no value
Instruction says: Click the Admin main menu tab at the top. Select the Property > User Management menu item. Paste the email address from the clipboard in to the field Add permissions for and make sure the permission is set to Read & Analyse. Click Add.
But this not found anywhere in Google Analytics console.. Please help!
Hi, as I got in this morning, I saw a new update to the plugin, so, I decided to update! unfortunatly, I got an error that crashed my whole website! Frontend and backend! I had to replace the google analytics new files for the old ones in order to get it to work.
I did try in a local machine again, to see if it would work, and it did, so, I don't know what's wrong... Here's the error:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <meta name="robots" content="noindex,nofollow" /> <style> /* Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.com/yui/license.html */ html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;} html { background: #eee; padding: 10px } img { border: 0; } #sf-resetcontent { width:970px; margin:0 auto; } .sf-reset { font: 11px Verdana, Arial, sans-serif; color: #333 } .sf-reset .clear { clear:both; height:0; font-size:0; line-height:0; } .sf-reset .clear_fix:after { display:block; height:0; clear:both; visibility:hidden; } .sf-reset .clear_fix { display:inline-block; } .sf-reset * html .clear_fix { height:1%; } .sf-reset .clear_fix { display:block; } .sf-reset, .sf-reset .block { margin: auto } .sf-reset abbr { border-bottom: 1px dotted #000; cursor: help; } .sf-reset p { font-size:14px; line-height:20px; color:#868686; padding-bottom:20px } .sf-reset strong { font-weight:bold; } .sf-reset a { color:#6c6159; cursor: default; } .sf-reset a img { border:none; } .sf-reset a:hover { text-decoration:underline; } .sf-reset em { font-style:italic; } .sf-reset h1, .sf-reset h2 { font: 20px Georgia, "Times New Roman", Times, serif } .sf-reset .exception_counter { background-color: #fff; color: #333; padding: 6px; float: left; margin-right: 10px; float: left; display: block; } .sf-reset .exception_title { margin-left: 3em; margin-bottom: 0.7em; display: block; } .sf-reset .exception_message { margin-left: 3em; display: block; } .sf-reset .traces li { font-size:12px; padding: 2px 4px; list-style-type:decimal; margin-left:20px; } .sf-reset .block { background-color:#FFFFFF; padding:10px 28px; margin-bottom:20px; -webkit-border-bottom-right-radius: 16px; -webkit-border-bottom-left-radius: 16px; -moz-border-radius-bottomright: 16px; -moz-border-radius-bottomleft: 16px; border-bottom-right-radius: 16px; border-bottom-left-radius: 16px; border-bottom:1px solid #ccc; border-right:1px solid #ccc; border-left:1px solid #ccc; } .sf-reset .block_exception { background-color:#ddd; color: #333; padding:20px; -webkit-border-top-left-radius: 16px; -webkit-border-top-right-radius: 16px; -moz-border-radius-topleft: 16px; -moz-border-radius-topright: 16px; border-top-left-radius: 16px; border-top-right-radius: 16px; border-top:1px solid #ccc; border-right:1px solid #ccc; border-left:1px solid #ccc; overflow: hidden; word-wrap: break-word; } .sf-reset a { background:none; color:#868686; text-decoration:none; } .sf-reset a:hover { background:none; color:#313131; text-decoration:underline; } .sf-reset ol { padding: 10px 0; } .sf-reset h1 { background-color:#FFFFFF; padding: 15px 28px; margin-bottom: 20px; -webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; border: 1px solid #ccc; } </style> </head> <body> <div id="sf-resetcontent" class="sf-reset"> <h1>Whoops, looks like something went wrong.</h1> <h2 class="block_exception clear_fix"> <span class="exception_counter">1/1</span> <span class="exception_title"><abbr title="Symfony\Component\Debug\Exception\FatalErrorException">FatalErrorException</abbr> in <a title="/home/mywebsite/public_html/plugins/october/drivers/vendor/guzzlehttp/guzzle/src/functions.php line 265" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">functions.php line 265</a>:</span> <span class="exception_message">Cannot redeclare GuzzleHttp\uri_template() (previously declared in /home/mywebsite/public_html/plugins/rainlab/googleanalytics/vendor/guzzlehttp/guzzle/src/functions.php:18)</span> </h2> <div class="block"> <ol class="traces list_exception"> <li> in <a title="/home/mywebsite/public_html/plugins/october/drivers/vendor/guzzlehttp/guzzle/src/functions.php line 265" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">functions.php line 265</a></li> </ol> </div> </div> </body> </html>
And that is litteraly the error that shows up, html and all, I did not copy the code, only the error that I was showed.
hello, tanks for the plugin.
why I get "Unable to load private key" on all my analytisc reportwidget?
i follow the guide on documentation.
thanks.
There are an error on /reportwidgets/browsers/partials/_widget.htm at line 12. It happen when the requested data response is null. I solved this issue, but like I'm new I don't know to do a pull request, so see bellow:
<ul>
<?php foreach ($rows as $row): ?>
<li><?= e($row[0]) ?> <span><?= $row[1] ?></span></li>
<?php endforeach ?>
</ul>
<ul>
<?php if($rows): ?>
<?php foreach ($rows as $row): ?>
<li><?= e($row[0]) ?> <span><?= $row[1] ?></span></li>
<?php endforeach ?>
<?php endif ?>
</ul>
Argument 1 passed to Google_Client::setCache() must be an instance of Google\Auth\CacheInterface, instance of RainLab\GoogleAnalytics\Classes\CacheItemPool given, called in /plugins/rainlab/googleanalytics/classes/Analytics.php on line 48 and defined
At the settings page it is not permitted to only set the Tracking ID and Domain Name. Because the Private Key and Profile ID are required:
I would like to use this plugin (the Tracker code component in particular) also when I don't have the Private Key and Profile ID yet. My clients not always are that quick with providing me with those data (key/id) and I want to start sending data from the website with the tracking code.
Of course I could just hardcode the tracking code into the templates, but It would be nice to make this a 'config only' thingy. Where I would have set up the component in the templates and the dashboard ready, the only thing needed should be fill out the configuration correctly.
So my main 'feature request' is: can the validation 'required' be dropped of Private Key and Profile ID?
/**
* Validation rules
*/
public $rules = [
'gapi_key' => 'required',
'profile_id' => 'required'
];
Hello,
I'm using latest version from github. On Chrome and Chromium everything works fine, but if I use firefox, I got "server responded with 0 code" when uploading json key file.
When uploading a private key it is placed in:
/storage/app/uploads/public/
Would it not be more secure to upload to:
/storage/app/uploads/protected/
Hi,
I am not sure why but some information about this plugin in the october website seems missing now?
Could you please add to the document section the link to GA Events API please and give an example of setting up a custom one.
(This info use to be up there and now it seems missing???)
Anyway, it would be easier for people if it was added to the documentation page please.
Thanks.
(Off to search for the GA Events API page now...)
Rainlab I found the link you should add its this one: https://developers.google.com/analytics/devguides/reporting/core/v3/common-queries
Hello,
Recently, google analytics plugin displayed an error popup when I try to save the settings in the backend.
It just instantly display a popup, with word "Error" in it. No event logs, nothing that could help me to debug.
I use this plugin since long time, never had problems before, and now I get it on all new projects. On the same server than before.
Don't know what to do as I don't have any logs, if somebody can point me something to do to get more informations...
Thanks
Alex
I'd like to get a pie chart of browsers, I'm trying to use the custom pie chart widget but I can't find any documentation.
There are two fields, dimension and metric.
How do I use these?
Installed Google Analytics Plugin into latest October CMS Version (build 346).
Want to configure in Backend, but can not see "Settings > Google Analytics." :(
Hi,
there is an issue with the Google API settings which causes a weird error : "mkdir(); permission denied".
It happens in the case of multiple instances of OctoberCMS + analytics plugin on the same machine executed as different users (through su-exec).
On each instance of the plugin, the Google API will try to create a tmp folder in "/tmp/Google_Client", using the configured su-exec owner/group and a 755 mask.
Indeed when another instance with different owner tries to create stuff inside this folder, it will fail.
You need to override the default configuration to fix the issue :
...
'Google_Cache_File' => array(
'directory' => sys_get_temp_dir() . '/Google_Client'
)
...
$config = new Google_Config();
$config->setClassConfig("Google_Cache_File", "directory", $SOME_OCTOBER_PLUGIN_DIR);
$client = new Google_Client($config);
Thanks.
I just updated this to v1.1.0 and uploaded the new .json key file also checked that the Tracking Id as well as View ID are indeed correct. However, when I goto my dashboard I get this..
I even tried deleting the service account and remaking it, adding Read & analyze permission to analytics but I still see this.
Hi,
I keep getting this error message on my dashboard:
Error calling GET https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A15210611&start-date=30daysAgo&end-date=today&metrics=ga%3Avisits&dimensions=ga%3Adate: (403) User does not have sufficient permissions for this profile.
I did all the steps as described, searched other solutions and anything seems to solve the problem.
What am i missing?
Cheers
I'm trying to upload de private Key, but nothings happen.
I set the folders pemissions to 777 but still isn't work.
I just updated to latest version (1.0.7), but there is a error like this about autoload:
ErrorException in autoload.php line 25:
google-api-php-client's autoloader was moved to src/Google/autoload.php in 1.1.3. This redirect will be removed in 1.2. Please adjust your code to use the new location.
Any solution?
in the widget it shows the following error
array_slice() expects parameter 1 to be array, null given
(theres no recent data in the analytics btw)
Im getting error on dashboard report widget.
count(): Parameter must be an array or an object that implements Countable
Looks like PHP7.+ requirement. Where it can be wrong.?
I searched for count()... corrected it... but it does not solve the issue.
please help
Hey there,
With the latest 270 build of October I am unable to upload .p12 certificate files for the Google Analytic plugin (version 1.0.3) within it's backend settings page. The upload widget DropZone seems to be setup to only accept a restricted set of file types such as media or text.
I've tried adding fileTypes: p12
to fields.yaml but the issue seems to run deeper into a nest of validation checks. I couldn't find anywhere to declare a set of MIME types in order to pass validation.
Thanks
I get an errormessage on the dashboard widgets:
Argument 1 passed to Google_Client::setCache() must be an instance of Google\Auth\CacheInterface, instance of RainLab\GoogleAnalytics\Classes\CacheItemPool given, called in /....../plugins/rainlab/googleanalytics/classes/Analytics.php on line 48 and defined
Did i miss something? Please let me know if you need more info.
Thanks in advance!
Hello community,
Is someone know how to change the report language ? It's in english but I would like it in french , don't find any info about that .
Regards
I don't get any errors but following the instructions the dashboard won't load if there are any tables loaded for this plugin. Mind helping me out a bit?
I cannot upload P12 key file, the page throws error. The key is password protected. Can anyone help?
The plugin registers the rainlab.googleanalytics.access_settings permission, but the settings register with the rainlab.googleanalytics.settings
Hi,
When uploading my private key, I have an error : Server responsed with 0 code
. And after, Can't upload more files
.
Hey sorry to bug you with a non-issue, but I've just been trying to track down some issues in my site. For this analytics plugin, did you ever use a vendor library React for promises (around release 1.0.5)? I appreciate the help!
It seems that this package is not registered at packagist.org, so it's not instalable via composer currently. π
At the very least disable uBlock, it doesn't like the name of this repo so it will cause breakages if you try to do anything normal like comment or submit a new issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.