Simple Google Analytics Tracking

Simple Google Analytics Tracking Install Statistics

11
100%
Today: 11 Yesterday: 0 All-time: 17,913 downloads
Simple Google Analytics Tracking Icon

Try plugin: Simple Google Analytics Tracking

We'll create fresh WordPress site with Simple Google Analytics Tracking installed. You have 20 minutes to test the plugin after that site we'll be deleted.

Takes ~10 seconds to install.

About Simple Google Analytics Tracking

Add Google Analytics to your site with just the Tracking ID through Simple Google Analytics Tracking.

9


0


0


0


0

updated: 7 years ago
since: 9 years ago
author: Dustyn Doyle

Description

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.

Simple Google Analytics Tracking does not track Editors and Administrators by default to prevent extra page views from showing up in your reports.
Editors and Administrators can be allowed through the sgat_output_ga_code filter.

Filters

sgat_output_ga_code: used to override the default user tracking setting.

Example Usage:

add_filter( 'sgat_output_ga_code', 'sgat_override_user_settings' );
function sgat_override_user_settings() {
  return true;
}


sgat_tracking_id: used to add the Tracking ID programmatically.

Example Usage:

add_filter( 'sgat_tracking_id', 'sgat_custom_ga_tracking_id' );
function sgat_custom_ga_tracking_id( $tracking_id ) {
  $tracking_id = 'UA-123456-7';
  return $tracking_id;
}


sgat_tracker_create_fields : Used to modify the information when creating the Google Analytics tracker.

Example Usage:

add_filter( 'sgat_tracker_create_fields', 'sgat_custom_tracker_create_fields' );
function sgat_custom_tracker_create_fields( $fields ) {
  $fields['siteSpeedSampleRate'] = 50;
  return $fields;
}


sgat_after_tracker : Used to add additional Google Analytics calls after the main tracker output.

Example Usage:

add_action( 'sgat_after_tracker', 'sgat_after_tracker_functionality’ );
function sgat_after_tracker_functionality() {
  echo "ga('send', 'event', 'MyCategory', 'MyAction', 'MyLabel', 50);";
}