Changeset 1438050
- Timestamp:
- 06/16/2016 08:45:47 PM (10 years ago)
- Location:
- easy-google-analytics-tracking/trunk
- Files:
-
- 2 added
- 2 edited
-
css (added)
-
css/admin.css (added)
-
easy-google-analytics-tracking.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easy-google-analytics-tracking/trunk/easy-google-analytics-tracking.php
r1403255 r1438050 51 51 add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'egat_add_setting_link'); 52 52 53 function egat_enqueue_css() 54 { 55 if($_GET['page'] == 'easy-google-analytics-tracking') 56 { 57 wp_enqueue_style('admin', plugins_url('/css/admin.css', __FILE__)); 58 } 59 } 60 add_action('admin_print_styles', 'egat_enqueue_css'); 61 53 62 function egat_google_analytics_script_menu() // Creates settings page 54 63 { … … 68 77 ?> 69 78 70 <div class="wrap" style="width:600px;">79 <div class="wrap" id="main-content"> 71 80 <h2>Google Analytics Script</h2> 72 81 <form method="post" action="options.php"> 73 82 <?php settings_fields('google-analytics-script-settings'); ?> 74 83 <?php do_settings_sections('google-analytics-script-settings'); ?> 75 <p> 76 <span>You can find the google tracking Id in your google analytics admin. Property > Tracking Info > Tracking Code.</span> 77 <br /> 78 <br /> 79 <span>Once you generate the Google Analytics Code, you can find the Google Tracking Id under the ga function with the first paramiter as "create" For example, ga('create', <b>'YOUR TRACKING CODE'</b>, 'auto').</span> 80 </p> 81 <label> 84 <div> 85 <p>You can find the google tracking Id in your google analytics admin. Property > Tracking Info > Tracking Code.</p> 86 <p>Once you generate the Google Analytics Code, you can find the Google Tracking Id under the ga function with the first paramiter as "create" For example, ga('create', <b>'YOUR TRACKING CODE'</b>, 'auto').</p> 87 </div> 88 <label class="tracking-id"> 82 89 <span>Google Analytics Tracking ID:</span> 83 </br > 84 <input name="google_analytics_tracking_id" value="<?php echo esc_attr(get_option('google_analytics_tracking_id')); ?>" style="width:300px;" /> 90 <input name="google_analytics_tracking_id" value="<?php echo esc_attr(get_option('google_analytics_tracking_id')); ?>" /> 85 91 </label> 86 <br /> 87 <br /> 88 <label> 89 <span style="margin:0 5px 0 0;">Enable Google Analytics:</span> 92 <label class="enable-tracking-id"> 93 <span>Enable Google Analytics:</span> 90 94 <input type="checkbox" name="google_analytics_enabled" value="1" <?php checked(1, get_option('google_analytics_enabled'), true); ?> /> 91 95 </label> … … 99 103 function egat_uninstall() // Cleans up database and WordPress files on uninstall 100 104 { 105 delete_option('google_analytics_tracking_id'); 101 106 delete_option('google_analytics_enabled'); 102 delete_option('google_analytics_tracking_id');103 107 } 104 108 register_uninstall_hook(__FILE__, 'egat_uninstall'); -
easy-google-analytics-tracking/trunk/readme.txt
r1411971 r1438050 3 3 Contributors: Lewis Self 4 4 Donate Link: http://selfdesigns.co.uk 5 Tags: google, analytics, website, data, tracking, simple, information, track, count, counter5 Tags: Google, Analytics, website data, tracking, simple 6 6 Requires at least: 4.0 7 7 Tested up to: 4.5 … … 27 27 You can find the settings for the plugin either under the wp-admin settings drop down or as a link on the plugin in the WordPress admin "plugins" menu. 28 28 29 = How do I find my tracking ID? =30 31 The Google Tracking ID is located inside of your google analytics script. the "ga()" function should hold your ID. See the second screenshot to see the provided example.32 33 29 = I have entered my tracking ID, but the script is not being executed. = 34 30 35 Make sure you have the "Enable Google Analytics" section checked. This isn't defaulted on activation so you will have to check it in the settings whenentering the google tracking ID.31 Make sure you have the "Enable Google Analytics" section checked. This isn't defaulted on activation so you will have to check it in the settings after entering the google tracking ID. 36 32 37 33 == Screenshots == 38 34 39 35 1. The plugin settings page. The tracking ID should look something like the one on the page. 40 2. Google Analytics script. The red highlighed box shows the tracking code needed to input inside of the "tracking code" box.41 36 42 37 == Upgrade Notice == … … 46 41 = 1.0.0 = 47 42 * Initial release: 17/04/2016 43 44 = 1.0.1 = 45 * Changed admin settings from inline style to external Style Sheet: 16/06/2016 46 * Responsive admin settings: 16/06/2016
Note: See TracChangeset
for help on using the changeset viewer.