{"id":50617,"date":"2016-09-01T02:50:27","date_gmt":"2016-09-01T02:50:27","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/track-a-click-on-google-analytics\/"},"modified":"2016-09-01T03:00:11","modified_gmt":"2016-09-01T03:00:11","slug":"track-a-click-on-google-analytics","status":"publish","type":"plugin","link":"https:\/\/bal.wordpress.org\/plugins\/track-a-click-on-google-analytics\/","author":3201356,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.4","stable_tag":"trunk","tested":"4.6.30","requires":"2.5.0","requires_php":"","requires_plugins":"","header_name":"Track a Click on Google Analytics","header_author":"Ink my web","header_description":"","assets_banners_color":"","last_updated":"2016-09-01 03:00:11","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.instamojo.com\/inkmyweb\/","header_plugin_uri":"https:\/\/www.inkmyweb.com\/wordpress\/track-click-google-analytics-wordpress-shortcode-plugin","header_author_uri":"https:\/\/www.inkmyweb.com\/","rating":5,"author_block_rating":0,"active_installs":10,"downloads":1988,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"1"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[5375,4752,1005,76591,7182],"plugin_category":[],"plugin_contributors":[95887,95889,95888],"plugin_business_model":[],"class_list":["post-50617","plugin","type-plugin","status-publish","hentry","plugin_tags-click-tracking","plugin_tags-event-tracking","plugin_tags-google-analytics","plugin_tags-link-click","plugin_tags-link-tracking","plugin_contributors-gounder","plugin_contributors-inkmyweb","plugin_contributors-sidmetal98","plugin_committers-gounder"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/track-a-click-on-google-analytics.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p><strong>Are you using UTM Source to track link clicks within your website?<\/strong><\/p>\n\n<p>That's a really bad idea! Not only will it create a new session with the links utm_source and inflate your visitor stats, it will also increase the bounce rate on the page you're tracking.<\/p>\n\n<p><strong>So what's the solution?<\/strong><\/p>\n\n<p>Use [event tracking] (https:\/\/developers.google.com\/analytics\/devguides\/collection\/analyticsjs\/events) on Google Analytics which capture events like a link click into your Google Analytics Dashboard.<\/p>\n\n<p>For e.g.\n    <a href=\"http:\/\/example.com\/wp-content\/uploads\/2015\/06\/free-ebook.pdf\">Download Free Ebook<\/a><\/p>\n\n<p>But then the WordPress Visual Editor will keep cleaning out the onClick part, so we made a quick shortcode that would save you from the trouble of redoing the onClick part everytime it got cleaned out.<\/p>\n\n<p><strong>How does it work?<\/strong><\/p>\n\n<p>In place of an A href tag like <code>&lt;a onClick=\"ga('send', 'event', 'Downloads', 'Click', 'Ebook downloaded', '0');\" href=\"http:\/\/example.com\/wp-content\/uploads\/2015\/06\/free-ebook.pdf\"&gt;Download Free Ebook&lt;\/a&gt;<\/code> use our shortcode <code>[tac_ga url=\"http:\/\/example.com\/wp-content\/uploads\/2015\/06\/free-ebook.pdf\" category=\"Downloads\" action=\"Click\" label=\"Ebook Downloaded\"]Download Free Ebook[\/tac_ga]<\/code><\/p>\n\n<p>By default this shortcode uses the following information:\nCategory: link\nAction: click\nLabel: The URL Entered<\/p>\n\n<p><strong>How do I check if this works<\/strong><\/p>\n\n<p>Google Analytics' Real time tab will show you that these tags would or not.<\/p>\n\n<p><em>Some cases in which this shortcode won't work:<\/em>\n* You use Google Tag Manager to insert Google Analytics\n* You use Monster Insights Plugin (Formerly Yoast's Google Analytics Plugin) to install Google Analytics<\/p>","raw_excerpt":"A simple shortcode to insert Google Analytics event tracking code on your links","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/50617","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=50617"}],"author":[{"embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/gounder"}],"wp:attachment":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=50617"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=50617"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=50617"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=50617"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=50617"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=50617"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}