{"id":34716,"date":"2015-02-24T19:06:38","date_gmt":"2015-02-24T19:06:38","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/simple-google-analytics-tracking\/"},"modified":"2017-04-19T23:21:00","modified_gmt":"2017-04-19T23:21:00","slug":"simple-google-analytics-tracking","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/simple-google-analytics-tracking\/","author":13878022,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.3","stable_tag":"1.3","tested":"4.7.33","requires":"3.8","requires_php":"","requires_plugins":"","header_name":"Simple Google Analytics Tracking","header_author":"Dustyn Doyle","header_description":"","assets_banners_color":"eeeeee","last_updated":"2017-04-19 23:21:00","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/dustyndoyle\/simple-google-analytics-tracking","header_author_uri":"http:\/\/www.dustyndoyle.com","rating":5,"author_block_rating":0,"active_installs":1000,"downloads":19352,"num_ratings":9,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","faq"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"9"},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"1098404","resolution":"128x128","location":"assets"},"icon-256x256.png":{"filename":"icon-256x256.png","revision":"1098396","resolution":"256x256","location":"assets"}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":"1098396","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.2","1.3"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1098390","resolution":"1","location":"assets"}},"screenshots":{"1":"Simple Google Analytics Tracking Admin screen"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[232,150,1005,1378,550],"plugin_category":[36],"plugin_contributors":[81927],"plugin_business_model":[],"class_list":["post-34716","plugin","type-plugin","status-publish","hentry","plugin_tags-analytics","plugin_tags-google","plugin_tags-google-analytics","plugin_tags-simple","plugin_tags-tracking","plugin_category-analytics","plugin_contributors-dustyn","plugin_committers-dustyn"],"banners":{"banner":"https:\/\/ps.w.org\/simple-google-analytics-tracking\/assets\/banner-772x250.png?rev=1098396","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/simple-google-analytics-tracking\/assets\/icon-128x128.png?rev=1098404","icon_2x":"https:\/\/ps.w.org\/simple-google-analytics-tracking\/assets\/icon-256x256.png?rev=1098396","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/simple-google-analytics-tracking\/assets\/screenshot-1.png?rev=1098390","caption":"Simple Google Analytics Tracking Admin screen"}],"raw_content":"<!--section=description-->\n<p>Simple Google Analytics Tracking allows you to add Google Analytics to your WordPress site with only the Tracking ID. Once the Tracking ID is input the Google Analytics code is added automatically with your Tracking ID.<\/p>\n\n<p>Simple Google Analytics Tracking does not track Editors and Administrators by default to prevent extra page views from showing up in your reports.\n<em>Editors and Administrators can be allowed through the <code>sgat_output_ga_code<\/code> filter.<\/em><\/p>\n\n<h4>Filters<\/h4>\n\n<pre><code>sgat_output_ga_code: used to override the default user tracking setting.\n<\/code><\/pre>\n\n<p>Example Usage:<\/p>\n\n<pre><code>add_filter( 'sgat_output_ga_code', 'sgat_override_user_settings' );\nfunction sgat_override_user_settings() {\n  return true;\n}\n\n\nsgat_tracking_id: used to add the Tracking ID programmatically.\n<\/code><\/pre>\n\n<p>Example Usage:<\/p>\n\n<pre><code>add_filter( 'sgat_tracking_id', 'sgat_custom_ga_tracking_id' );\nfunction sgat_custom_ga_tracking_id( $tracking_id ) {\n  $tracking_id = 'UA-123456-7';\n  return $tracking_id;\n}\n\n\nsgat_tracker_create_fields : Used to modify the information when creating the Google Analytics tracker.\n<\/code><\/pre>\n\n<p>Example Usage:<\/p>\n\n<pre><code>add_filter( 'sgat_tracker_create_fields', 'sgat_custom_tracker_create_fields' );\nfunction sgat_custom_tracker_create_fields( $fields ) {\n  $fields['siteSpeedSampleRate'] = 50;\n  return $fields;\n}\n\n\nsgat_after_tracker : Used to add additional Google Analytics calls after the main tracker output.\n<\/code><\/pre>\n\n<p>Example Usage:<\/p>\n\n<pre><code>add_action( 'sgat_after_tracker', 'sgat_after_tracker_functionality\u2019 );\nfunction sgat_after_tracker_functionality() {\n  echo \"ga('send', 'event', 'MyCategory', 'MyAction', 'MyLabel', 50);\";\n}\n<\/code><\/pre>\n\n<!--section=faq-->\n<dl>\n<dt>Installation Instructions<\/dt>\n<dd><ol>\n<li>Upload the <code>simple-google-analytics-tracking<\/code> directory to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>In the \"Settings\" menu, go to \"Google Analytics\"<\/li>\n<li>Enter your Tracking ID in the \"Tracking ID\" input box and click the \"Save Tracking ID\" button<\/li>\n<\/ol><\/dd>\n<dt>Can I include Editors and Administrators?<\/dt>\n<dd><p>Yes, Editors and Administrators can be included by using the <code>sgat_output_ga_code<\/code> filter.<\/p><\/dd>\n<dt>Can the Tracking ID be added programatically?<\/dt>\n<dd><p>Yes, the Tracking ID can be changed with the <code>sgat_tracking_id<\/code> filter.<\/p><\/dd>\n<dt>Can the Tracking Fields be added programatically?<\/dt>\n<dd><p>Yes, the Tracking Fields can be changed with the <code>sgat_tracker_create_fields<\/code> filter.<\/p><\/dd>\n<dt>Can additional tracking calls be added after Google Analytics?<\/dt>\n<dd><p>Yes, additional tracking calls be added after Google Analytics is added with the <code>sgat_after_tracker<\/code> action.<\/p><\/dd>\n\n<\/dl>","raw_excerpt":"Add Google Analytics to your site with just the Tracking ID through Simple Google Analytics Tracking.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/34716","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=34716"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/dustyn"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=34716"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=34716"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=34716"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=34716"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=34716"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=34716"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}