Skip to content

Commit

Permalink
bugfix: authors custom dimension not working for pages
Browse files Browse the repository at this point in the history
  • Loading branch information
deconf committed Oct 4, 2014
1 parent 239131b commit 26139c0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
6 changes: 3 additions & 3 deletions front/tracking/code-universal.php
Expand Up @@ -25,7 +25,7 @@
$create_options .= "'allowLinker' : true";
}
$create_options .= '}';
?>
?>
ga('create', '<?php echo esc_html($profile[2]); ?>', 'auto'<?php if ($create_options != '{}') {?>, <?php echo $create_options; }?>);
<?php if ($GADASH_Config->options ['ga_crossdomain_tracking'] AND $GADASH_Config->options ['ga_crossdomain_list']!='') {?>
ga('require', 'linker');
Expand All @@ -50,7 +50,7 @@
<?php
}

if ($GADASH_Config->options ['ga_author_dimindex'] and is_single ()) {
if ($GADASH_Config->options ['ga_author_dimindex'] and (is_single () or is_page())) {
global $post;
$author_id = $post->post_author;
$author_name = get_the_author_meta ( 'display_name', $author_id );
Expand Down Expand Up @@ -100,5 +100,5 @@
?>

window.google_analytics_uacct = "<?php echo esc_html($profile[2]); ?>";
<?php }?>
<?php }?>
</script>
24 changes: 12 additions & 12 deletions gadwp.php
@@ -1,13 +1,13 @@
<?php
/**
* Plugin Name: Google Analytics Dashboard for WP
* Plugin URI: https://deconf.com
* Description: Displays Google Analytics Reports and Real-Time Statistics in your Dashboard. Automatically inserts the tracking code in every page of your website.
* Author: Alin Marcu
* Version: 4.3.4
* Plugin Name: Google Analytics Dashboard for WP
* Plugin URI: https://deconf.com
* Description: Displays Google Analytics Reports and Real-Time Statistics in your Dashboard. Automatically inserts the tracking code in every page of your website.
* Author: Alin Marcu
* Version: 4.3.4b
* Author URI: https://deconf.com
*/
define ( 'GADWP_CURRENT_VERSION', '4.3.4' );
define ( 'GADWP_CURRENT_VERSION', '4.3.4b' );

/*
* Include Install
Expand All @@ -16,7 +16,7 @@
include_once (dirname ( __FILE__ ) . '/install/install.php');
register_activation_hook ( __FILE__, array (
'GADASH_Install',
'install'
'install'
) );

/*
Expand All @@ -25,7 +25,7 @@
include_once (dirname ( __FILE__ ) . '/install/uninstall.php');
register_uninstall_hook ( __FILE__, array (
'GADASH_Uninstall',
'uninstall'
'uninstall'
) );

// Plugin i18n
Expand All @@ -45,13 +45,13 @@ function gadash_admin_init() {
*/
include_once (dirname ( __FILE__ ) . '/config.php');
global $GADASH_Config;

/*
* Include Tools
*/
include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
$tools = new GADASH_Tools ();

/*
* Include backend widgets
*/
Expand All @@ -69,13 +69,13 @@ function gadash_front_init() {
*/
include_once (dirname ( __FILE__ ) . '/config.php');
global $GADASH_Config;

/*
* Include Tools
*/
include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
$tools = new GADASH_Tools ();

/*
* Include frontend stats
*/
Expand Down
3 changes: 3 additions & 0 deletions readme.txt
Expand Up @@ -119,6 +119,9 @@ This plugin it's released under the GPLv2, you can use it free of charge on your

== Changelog ==

= 4.3.5 =
- bugfix: authors custom dimension not working for pages

= 4.3.4 =
- feature: ga_dash_addtrackingcode action hook
- feature: French translation
Expand Down

0 comments on commit 26139c0

Please sign in to comment.