mp0600
Forum Replies Created
-
Hello, sorry i just saw your messages. Yes i m using custom roles created by the plugin Dokan. As the role "Vendor". Also i have a lots of custom codes, that i wrote to be able to display google site kit for this roles outside the "admin" screens. I import by my self all the needed scripts : add_action( 'wp_enqueue_scripts',"enqueueAssetsOutsideAdminMain",99999999 ); function enqueueAssetsOutsideAdminMain($assets){ global $post, $getParamMoreStats,$wp; $isMyAccount = is_account_page(); if (!is_user_logged_in()) return false; if ((is_product() && $post->post_author==get_current_user_id()) || $isMyAccount){ $plugin = Google\Site_Kit\Plugin::instance(); $context = $plugin->context(); $assets = new Google\Site_Kit\Core\Assets\Assets($context); $modules = new Google\Site_Kit\Core\Modules\Modules($context); if (!current_user_can( Google\Site_Kit\Core\Permissions\Permissions::VIEW_SHARED_DASHBOARD )){ $user_options = new Google\Site_Kit\Core\Storage\User_Options( $context, get_current_user_id() ); $dismissed_items = new Google\Site_Kit\Core\Dismissals\Dismissed_Items( $user_options ); $dismissed_items->add( "shared_dashboard_splash", 0 ); } if ($isMyAccount){ if (strpos($_SERVER['REQUEST_URI'],'/stats/') !== false){ $assets->enqueue_asset( 'googlesitekit-main-dashboard' ); $assets->enqueue_asset( 'googlesitekit-admin-css' ); } else if (basename($wp->request) === 'my-account'){ $assets->enqueue_asset( 'googlesitekit-wp-dashboard' ); $assets->enqueue_asset( 'googlesitekit-admin-css' ); $assets->enqueue_asset( 'googlesitekit-wp-dashboard-css' ); } } else{ if (isset($_GET[$getParamMoreStats])){ $assets->enqueue_asset( 'googlesitekit-entity-dashboard' ); $assets->enqueue_asset( 'googlesitekit-admin-css' ); } else{ $assets->enqueue_asset( 'googlesitekit-adminbar' ); $assets->enqueue_asset( 'googlesitekit-adminbar-css' ); } } $modules->enqueue_assets(); } } and after i just display this div to display it in the screen i want : add_action( 'woocommerce_account_stats_endpoint', function() { echo '<div id="js-googlesitekit-main-dashboard" data-view-only="true" class="googlesitekit-plugin"></div>'; }); But for the moment after the changes that i tell you, i didn't get the problem anymoreFinnaly i just find why i got this error it’s not linked to the number of tiles selected in same time but there was some “Key metrics” that need “custom dimensions” and if user (with view mode) try to use this key metrics before admin add them first these error occurs. But even after admin add them the error still appear in user screen. Admin need to reset site kit settings and add all custom dimension needed by some key metrics before user with view mode can use them without error. But it’s not normal that error occurs like that user need to just be noticed. Can you please add a ticket or an issue to dev team to fix it.
Thank for all anyways.
- This reply was modified 2 years, 1 month ago by mp0600.
here is the console log errors from incognito : googlesitekit-vendor…7dc15416c5a24d.js:7 Uncaught (in promise) RangeError: Maximum call stack size exceeded at googlesitekit-vendor…6c5a24d.js:7:472200 at new Promise (<anonymous>) at googlesitekit-vendor…6c5a24d.js:7:472179 at l (googlesitekit-vendor…6c5a24d.js:7:482307) at c (googlesitekit-vendor…6c5a24d.js:7:481583) at Object.s [as getAuthentication] (googlesitekit-vendor…6c5a24d.js:7:482338) at googlesitekit-datast…1794e049.js:14:2209 at t (googlesitekit-vendor…16c5a24d.js:7:74373) at googlesitekit-vendor…6c5a24d.js:7:481181 at Object.n [as isAuthenticated] (googlesitekit-vendor…6c5a24d.js:7:480747) googlesitekit-vendor…7dc15416c5a24d.js:7 Uncaught (in promise) RangeError: Maximum call stack size exceeded at googlesitekit-vendor…6c5a24d.js:7:472200 at new Promise (<anonymous>) at googlesitekit-vendor…6c5a24d.js:7:472179 at l (googlesitekit-vendor…6c5a24d.js:7:482307) at c (googlesitekit-vendor…6c5a24d.js:7:481583) at Object.s [as getKeyMetricsSettings] (googlesitekit-vendor…6c5a24d.js:7:482338) at P.getUserPickedMetrics (googlesitekit-datast…794e049.js:14:17798) at t (googlesitekit-vendor…16c5a24d.js:7:74373) at googlesitekit-vendor…6c5a24d.js:7:481181 at n (googlesitekit-vendor…6c5a24d.js:7:480747) googlesitekit-vendor…7dc15416c5a24d.js:7 Uncaught (in promise) RangeError: Maximum call stack size exceeded at e (googlesitekit-vendor…6c5a24d.js:7:481649) at googlesitekit-vendor…6c5a24d.js:7:472214 at new Promise (<anonymous>) at googlesitekit-vendor…6c5a24d.js:7:472179 at l (googlesitekit-vendor…6c5a24d.js:7:482307) at c (googlesitekit-vendor…6c5a24d.js:7:481583) at Object.s [as getAuthentication] (googlesitekit-vendor…6c5a24d.js:7:482338) at googlesitekit-datast…1794e049.js:14:2209 at t (googlesitekit-vendor…16c5a24d.js:7:74373) at googlesitekit-vendor…6c5a24d.js:7:481181 googlesitekit-vendor…7dc15416c5a24d.js:7 Uncaught (in promise) RangeError: Maximum call stack size exceeded at googlesitekit-vendor…6c5a24d.js:7:472200 at new Promise (<anonymous>) at googlesitekit-vendor…6c5a24d.js:7:472179 at l (googlesitekit-vendor…6c5a24d.js:7:482307) at c (googlesitekit-vendor…6c5a24d.js:7:481583) at Object.s [as getAuthentication] (googlesitekit-vendor…6c5a24d.js:7:482338) at googlesitekit-datast…1794e049.js:14:2209 at t (googlesitekit-vendor…16c5a24d.js:7:74373) at googlesitekit-vendor…6c5a24d.js:7:481181 at Object.n [as isAuthenticated] (googlesitekit-vendor…6c5a24d.js:7:480747) googlesitekit-vendor…7dc15416c5a24d.js:7 Uncaught (in promise) RangeError: Maximum call stack size exceeded at googlesitekit-vendor…6c5a24d.js:7:472200 at new Promise (<anonymous>) at googlesitekit-vendor…6c5a24d.js:7:472179 at l (googlesitekit-vendor…6c5a24d.js:7:482307) at c (googlesitekit-vendor…6c5a24d.js:7:481583) at Object.s [as getKeyMetricsSettings] (googlesitekit-vendor…6c5a24d.js:7:482338) at P.getUserPickedMetrics (googlesitekit-datast…794e049.js:14:17798) at t (googlesitekit-vendor…16c5a24d.js:7:74373) at googlesitekit-vendor…6c5a24d.js:7:481181 at n (googlesitekit-vendor…6c5a24d.js:7:480747) googlesitekit-vendor…7dc15416c5a24d.js:7 Uncaught (in promise) RangeError: Maximum call stack size exceeded at e (googlesitekit-vendor…6c5a24d.js:7:481649) at googlesitekit-vendor…6c5a24d.js:7:472214 at new Promise (<anonymous>) at googlesitekit-vendor…6c5a24d.js:7:472179 at l (googlesitekit-vendor…6c5a24d.js:7:482307) at c (googlesitekit-vendor…6c5a24d.js:7:481583) at Object.s [as getAuthentication] (googlesitekit-vendor…6c5a24d.js:7:482338) at googlesitekit-datast…1794e049.js:14:2209 at t (googlesitekit-vendor…16c5a24d.js:7:74373) at googlesitekit-vendor…6c5a24d.js:7:481181 googlesitekit-vendor…7dc15416c5a24d.js:7 Uncaught (in promise) RangeError: Maximum call stack size exceeded at e (googlesitekit-vendor…6c5a24d.js:7:481649) at googlesitekit-vendor…6c5a24d.js:7:472214 at new Promise (<anonymous>) at googlesitekit-vendor…6c5a24d.js:7:472179 at l (googlesitekit-vendor…6c5a24d.js:7:482307) at c (googlesitekit-vendor…6c5a24d.js:7:481583) at Object.s [as getKeyMetricsSettings] (googlesitekit-vendor…6c5a24d.js:7:482338) at P.getUserPickedMetrics (googlesitekit-datast…794e049.js:14:17798) at t (googlesitekit-vendor…16c5a24d.js:7:74373) at googlesitekit-vendor…6c5a24d.js:7:481181 googlesitekit-vendor…7dc15416c5a24d.js:7 Uncaught (in promise) RangeError: Maximum call stack size exceeded at googlesitekit-vendor…6c5a24d.js:7:472200 at new Promise (<anonymous>) at googlesitekit-vendor…6c5a24d.js:7:472179 at l (googlesitekit-vendor…6c5a24d.js:7:482307) at c (googlesitekit-vendor…6c5a24d.js:7:481583) at Object.s [as getAuthentication] (googlesitekit-vendor…6c5a24d.js:7:482338) at googlesitekit-datast…1794e049.js:14:2209 at t (googlesitekit-vendor…16c5a24d.js:7:74373) at googlesitekit-vendor…6c5a24d.js:7:481181 at Object.n [as isAuthenticated] (googlesitekit-vendor…6c5a24d.js:7:480747) googlesitekit-vendor…7dc15416c5a24d.js:7 Uncaught (in promise) RangeError: Maximum call stack size exceeded at googlesitekit-vendor…6c5a24d.js:7:472200 at new Promise (<anonymous>) at googlesitekit-vendor…6c5a24d.js:7:472179 at l (googlesitekit-vendor…6c5a24d.js:7:482307) at c (googlesitekit-vendor…6c5a24d.js:7:481583) at Object.s [as getKeyMetricsSettings] (googlesitekit-vendor…6c5a24d.js:7:482338) at P.getUserPickedMetrics (googlesitekit-datast…794e049.js:14:17798) at t (googlesitekit-vendor…16c5a24d.js:7:74373) at googlesitekit-vendor…6c5a24d.js:7:481181 at n (googlesitekit-vendor…6c5a24d.js:7:480747) bp-messages-free.min.js?ver=2.5.1:2 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu bp-messages-free.min.js?ver=2.5.1:2 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu googlesitekit-vendor…7dc15416c5a24d.js:7 GET https://mp-marketplace.fr/wp-json/google-site-kit/v1/core/site/data/consent-mode?_locale=user 403 (Forbidden) googlesitekit-api-70…041faa4c5f1f24.js:3 Google Site Kit API Error method:GET datapoint:consent-mode type:core identifier:site error:"Désolé, vous n’avez pas l’autorisation de faire cela."a make multiple tests and this occurs only when user bulk modify tiles “key metrics”. When he change only its works, when he change two it’s work but he change 3 or 4 at same time a have these errors. And this error is only visible from the account of the user wich modify the key metrics in others account evrything works good
Hello, i tried again from a non admin user to change “key metrics” tiles but i got again the same error. And this occurs each time i tried to modify tile “key metrics” in bulk.
and here is the error i get :
googlesitekit-vendor-daa7be7dc15416c5a24d.js:1 Uncaught (in promise) RangeError: Maximum call stack size exceeded
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:472200
at new Promise ()
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:472179
at l (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:482307)
at c (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:481583)
at Object.s as getAuthentication
at googlesitekit-datastore-user-4f759e3b7c911794e049.js:14:2209
at t (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:74373)
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:481181
at Object.n as isAuthenticated
googlesitekit-vendor-daa7be7dc15416c5a24d.js:1 Uncaught (in promise) RangeError: Maximum call stack size exceeded
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:472200
at new Promise ()
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:472179
at l (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:482307)
at c (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:481583)
at Object.s as getKeyMetricsSettings
at P.getUserPickedMetrics (googlesitekit-datastore-user-4f759e3b7c911794e049.js:14:17798)
at t (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:74373)
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:481181
at n (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:480747)
googlesitekit-vendor-daa7be7dc15416c5a24d.js:1 Uncaught (in promise) RangeError: Maximum call stack size exceeded
at e (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:481649)
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:472214
at new Promise ()
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:472179
at l (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:482307)
at c (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:481583)
at Object.s as getAuthentication
at googlesitekit-datastore-user-4f759e3b7c911794e049.js:14:2209
at t (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:74373)
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:481181
googlesitekit-vendor-daa7be7dc15416c5a24d.js:1 Uncaught (in promise) RangeError: Maximum call stack size exceeded
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:472200
at new Promise ()
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:472179
at l (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:482307)
at c (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:481583)
at Object.s as getAuthentication
at googlesitekit-datastore-user-4f759e3b7c911794e049.js:14:2209
at t (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:74373)
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:481181
at Object.n as isAuthenticated
googlesitekit-vendor-daa7be7dc15416c5a24d.js:1 Uncaught (in promise) RangeError: Maximum call stack size exceeded
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:472200
at new Promise ()
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:472179
at l (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:482307)
at c (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:481583)
at Object.s as getKeyMetricsSettings
at P.getUserPickedMetrics (googlesitekit-datastore-user-4f759e3b7c911794e049.js:14:17798)
at t (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:74373)
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:481181
at n (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:480747)
googlesitekit-vendor-daa7be7dc15416c5a24d.js:1 Uncaught (in promise) RangeError: Maximum call stack size exceeded
at e (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:481649)
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:472214
at new Promise ()
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:472179
at l (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:482307)
at c (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:481583)
at Object.s as getAuthentication
at googlesitekit-datastore-user-4f759e3b7c911794e049.js:14:2209
at t (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:74373)
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:481181
googlesitekit-vendor-daa7be7dc15416c5a24d.js:1 Uncaught (in promise) RangeError: Maximum call stack size exceeded
at e (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:481649)
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:472214
at new Promise ()
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:472179
at l (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:482307)
at c (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:481583)
at Object.s as getKeyMetricsSettings
at P.getUserPickedMetrics (googlesitekit-datastore-user-4f759e3b7c911794e049.js:14:17798)
at t (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:74373)
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:481181
googlesitekit-vendor-daa7be7dc15416c5a24d.js:1 Uncaught (in promise) RangeError: Maximum call stack size exceeded
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:472200
at new Promise ()
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:472179
at l (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:482307)
at c (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:481583)
at Object.s as getAuthentication
at googlesitekit-datastore-user-4f759e3b7c911794e049.js:14:2209
at t (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:74373)
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:481181
at Object.n as isAuthenticated
googlesitekit-vendor-daa7be7dc15416c5a24d.js:1 Uncaught (in promise) RangeError: Maximum call stack size exceeded
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:472200
at new Promise ()
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:472179
at l (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:482307)
at c (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:481583)
at Object.s as getKeyMetricsSettings
at P.getUserPickedMetrics (googlesitekit-datastore-user-4f759e3b7c911794e049.js:14:17798)
at t (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:74373)
at googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:481181
at n (googlesitekit-vendor-daa7be7dc15416c5a24d.js:7:480747)
/wp-json/google-site-kit/v1/core/site/data/consent-mode?_locale=user:1Failed to load resource: the server responded with a status of 403 ()googlesitekit-api-70e15a041faa4c5f1f24.js:3 Google Site Kit API Error method:GET datapoint:consent-mode type:core identifier:site error:”Désolé, vous n’avez pas l’autorisation de faire cela.”
(anonymous) @ googlesitekit-api-70e15a041faa4c5f1f24.js:3Thank you for your replie.
I think I may have expressed myself poorly; the goal would be to display this data from WordPress using this plugin, rather than just blocking the data submission. Is there by any chance a function or a way that would allow me to have the same output as the main dashboard but filtering the pages based on the current user? This would mean that each user would see a different dashboard based on their own posts. Also, another question: is there a function that would allow me to display only certain widgets, such as ‘Most Popular Authors by Page Views’?Also a last question, is it possible to filter analytics datas, by current user as author. the main goal will be to display a main dashboard for users with theirs custom datas specific to post where there are authors
Here is a link where you can see the stats outside admin pages :
https://mp-marketplace.fr/products/test-piur-notif/?moreStats=1
Also i noticed that when i click on “.googlesitekit-data-block__title-datapoint-wrapper” blocks the graph take long time to refresh datas, and this occurs only outside admin pages. Because when i m on admin page the render is smoth when i navigate between blocksThank you for you response, i cannot reproduce the error. To fix it i just reset google site kit plugin param and it’s work
thank you for the quick response. Finaly i found how to display the entity-dashboard on another page than admin page , with this code : add_action( 'wp_enqueue_scripts',"enqueueAssetsOutsideAdminMain",99999999 ); function enqueueAssetsOutsideAdminMain($assets){ global $post, $getParamMoreStats; if (is_product() && $post->post_author==get_current_user_id()){ $plugin = Google\Site_Kit\Plugin::instance(); $context = $plugin->context(); $assets = new Google\Site_Kit\Core\Assets\Assets($context); $modules = new Google\Site_Kit\Core\Modules\Modules($context); if (isset($_GET[$getParamMoreStats])){ $assets->enqueue_asset( 'googlesitekit-entity-dashboard' ); $assets->enqueue_asset( 'googlesitekit-admin-css' ); } else{ $assets->enqueue_asset( 'googlesitekit-adminbar' ); $assets->enqueue_asset( 'googlesitekit-adminbar-css' ); } $modules->enqueue_assets(); } } and i render the entity dashboard with this div : <div id="js-googlesitekit-entity-dashboard" data-view-only="true" class="googlesitekit-plugin"></div> But i didn't find a way to display only the module "key metrics" to be able to display custom dimensions metrics linked to the current user