{"id":28017,"date":"2014-02-24T17:30:34","date_gmt":"2014-02-24T17:30:34","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/google-analytics-internal\/"},"modified":"2015-04-10T15:52:14","modified_gmt":"2015-04-10T15:52:14","slug":"google-analytics-internal","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/google-analytics-internal\/","author":13682858,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.3.0","stable_tag":"0.3.0","tested":"4.1.42","requires":"3.8.1","requires_php":"","requires_plugins":"","header_name":"Google Analytics Internal","header_author":"Dan Bissonnet","header_description":"","assets_banners_color":"","last_updated":"2015-04-10 15:52:14","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/danisadesigner.com\/plugins\/google-analytics-internal","header_author_uri":"http:\/\/danisadesigner.com\/","rating":0,"author_block_rating":0,"active_installs":10,"downloads":1679,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1.0","0.2.0","0.3.0"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[32833,1486,1005,10584,2970],"plugin_category":[40],"plugin_contributors":[90782],"plugin_business_model":[],"class_list":["post-28017","plugin","type-plugin","status-closed","hentry","plugin_tags-comments-analytics","plugin_tags-events","plugin_tags-google-analytics","plugin_tags-internal","plugin_tags-publish","plugin_category-calendar-and-events","plugin_contributors-dbisso","plugin_committers-dbisso"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/google-analytics-internal.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Google Analytics gathers lots of data when users interact with your site from the front end, but sometimes you need to match this with actions taken in WordPress.<\/p>\n\n<p>This plugin triggers a custom event in Google Analytics when a post is published. That way you can monitor any relationship between publishing and changes in traffic.<\/p>\n\n<p>Update: the plugin now creates events for comments too so you can track the number of comments submitted or approved.<\/p>\n\n<p>That's it at the moment. If there are other events you would like to track or any improvements, let me know in the support forums or even better on <a href=\"http:\/\/github.com\/dbisso\/wp-google-analytics-internal\">GitHub<\/a>.<\/p>\n\n<p>If you already have Yoast's <a href=\"http:\/\/wordpress.org\/plugins\/google-analytics-for-wordpress\/\">Google Analytics for WordPress<\/a> installed and configured, you don't need to do anything as the plugin should find you UA string automatically.<\/p>\n\n<p>If you don't have Yoast's plugin, you can set your UA string in your <code>wp-config.php<\/code>:<\/p>\n\n<pre><code>define( 'DBISSO_GA_UA', 'UA-XXXXXXXX-Y' );\n<\/code><\/pre>\n\n<h3>Configuration<\/h3>\n\n<p>Currently there is no GUI for the plugin, but you can use the <code>dbisso_gai_event_actions<\/code> filter to choose which events you want to be triggered and what the Google Analytics event action will be. For example:<\/p>\n\n<pre><code>add_filter( 'dbisso_gai_event_actions', 'custom_theme_filter_dbisso_gai_event_actions', 10, 1 );\n\nfunction custom_theme_filter_dbisso_gai_event_actions( $actions ) {\n    \/\/ Don't send 'update post' events\n    $actions['update_post'] = false;\n\n    \/\/ Change the action name that appears in Google Analytics\n    $actions['publish_post'] = __( 'Publish Post' ),\n\n    return $actions\n}\n<\/code><\/pre>\n\n<p>There are currently four actions <code>publish_post<\/code>, <code>update_posts<\/code>, <code>comment_submitted<\/code> and <code>comment_approved<\/code>.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload <code>dbisso-google-analytics-internal<\/code> foler to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<\/ol>\n\n<p>If you already have Yoast's <a href=\"http:\/\/wordpress.org\/plugins\/google-analytics-for-wordpress\/\">Google Analytics for WordPress<\/a> installed and configured, you don't need to do anything as the plugin should find you UA string automatically.<\/p>\n\n<p>If you don't have Yoast's plugin, you can set your UA string in your <code>wp-config.php<\/code>:<\/p>\n\n<pre><code>define( 'DBISSO_GA_UA', 'UA-XXXXXXXX-Y' );\n<\/code><\/pre>\n\n<!--section=changelog-->\n<h4>0.3.0<\/h4>\n\n<ul>\n<li>Fix: Use Yoast_GA_Options to look for UA string supplied by Yoast's Google Analytics for WordPress.<\/li>\n<li>Deleting, trashing or unapproving a comment no longer triggers an event<\/li>\n<\/ul>\n\n<h4>0.2.0<\/h4>\n\n<ul>\n<li>Feature: Add tracking when a comment is posted or approved.<\/li>\n<li>Introduce filter <code>dbisso_gai_event_data<\/code> to filter data just before event is sent.<\/li>\n<li>Introduce filter <code>dbisso_gai_event_actions<\/code> to set the action strings for different WP.<\/li>\n<li>Updates to posts are now have a separate action ('Update Post').<\/li>\n<li>I18n for some strings.<\/li>\n<li>Introduce <code>DBisso_GoogleAnalyticsInternal_Event<\/code> to manage the sending of events.<\/li>\n<li>Add some basic unit tests<\/li>\n<li>Include my name in copyright statement!<\/li>\n<\/ul>\n\n<h4>0.1.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"Use Google Analytics events to track when you publish posts.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/28017","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=28017"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/dbisso"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=28017"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=28017"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=28017"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=28017"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=28017"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=28017"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}