{"id":15279654,"date":"2022-01-22T15:58:28","date_gmt":"2022-01-22T15:58:28","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/ga-shortcode\/"},"modified":"2022-01-22T15:58:28","modified_gmt":"2022-01-22T15:58:28","slug":"ga-shortcode","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/ga-shortcode\/","title":{"rendered":"GA shortcode"},"content":{"rendered":"<p>Hello,<br \/>\nI&#8217;m looking for a plugin which allows free (!) usable shortcodes both on frontend-pages as well as in PHP-widgets.<br \/>\nI have read the article on https:\/\/help.10web.io\/hc\/en-us\/articles\/360017852692-Publishing-Google-Analytics-Widget but as far as I understood the plugin only offers it&#8217;s own widget to display GA-data om the frontend, right?<br \/>\nWhat I want to do is to use the values of total visitors, yesterdays visitors, todays visitors and current visitors within my own PHP-widget. Data should be fetched by something like<br \/>\n&lt;?php<br \/>\n$a = do_shortcode(&#8220;[your_shortcode_for_all_visitors_of_the_site]&#8221;);<br \/>\n&#8230;<br \/>\n?&gt;<br \/>\nIs that possible?<br \/>\nThanks a lot for your kind response.<br \/>\nKind regards<br \/>\nMatta<\/p>\n","protected":false},"template":"","class_list":["post-15279654","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15279654","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15279654\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=15279654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}