pt_save_data( $key_google_token )){
$update_message = '
';
}
}
}
$url = http_build_query( array(
'next' => $wp_analytify->pa_setting_url(),
'scope' => ANALYTIFY_SCOPE,
'response_type' => 'code',
'redirect_uri' => ANALYTIFY_REDIRECT,
'client_id' => get_option('ANALYTIFY_CLIENTID'),
'access_type' => 'offline',
'approval_prompt' => 'auto'
)
);
// Saving settings for back end Analytics for Posts and Pages.
if ( isset( $_POST[ 'save_settings_admin' ] ) ) {
update_option( 'post_analytics_settings_back' , $_POST[ 'backend' ] );
update_option( 'analytify_posts_stats' , $_POST[ 'posts' ] );
update_option( 'post_analytics_access_back' , $_POST[ 'access_role_back' ] );
update_option( 'post_analytics_disable_back' , $_POST[ 'disable_back' ] );
update_option( 'post_analytics_exclude_posts_back', @$_POST[ 'exclude_posts_back' ]);
$update_message = '';
} // endif
// Saving Profiles
if (isset($_POST[ 'save_profile' ])) {
$profile_id = $_POST[ 'webprofile' ];
$display_tracking_code = $_POST[ 'display_tracking_code' ];
$tracking_code = $_POST[ 'tracking_code' ];
$web_profile_dashboard = $_POST[ 'webprofile_dashboard' ];
$web_profile_url = $_POST[ $web_profile_dashboard ];
$webPropertyId = $_POST[ $profile_id."-1"];
update_option( 'pt_webprofile', $profile_id );
update_option( 'webPropertyId', $webPropertyId);
update_option( 'pt_webprofile_dashboard', $web_profile_dashboard );
update_option( 'pt_webprofile_url', urldecode( urldecode( $web_profile_url )));
update_option( 'analytify_tracking_code', $tracking_code);
update_option( 'display_tracking_code', $display_tracking_code);
if( isset( $_POST[ 'ga_code' ] ) ) {
update_option( 'analytify_code', 1 );
}
else{
update_option( 'analytify_code', 0 );
}
$update_message = '
Your Google Analytics Profile Saved.
';
}
// Clear Authorization and other data
if (isset($_POST[ "clear" ])) {
delete_option( 'pt_webprofile' );
delete_option( 'pt_webprofile_dashboard' );
delete_option( 'pt_webprofile_url' );
delete_option( 'pa_google_token' );
delete_option( 'pa_welcome_message' );
delete_option( 'post_analytics_token' );
$update_message = '
Authentication Cleared login again.
';
}
?>
pa_settings_tabs($_GET['tab']);
else $wp_analytify->pa_settings_tabs( 'authentication' );
if ( isset ( $_GET['tab'] ) )
$tab = $_GET['tab'];
else
$tab = 'authentication';
// Authentication Tab section
if( $tab == 'authentication' ) {
?>
pt_get_analytics_accounts();
if( isset( $profiles ) ) { ?>
| Features |
Free |
Pro |
| Support |
No |
Yes |
| Dashboard |
Yes |
Yes |
| Live Stats |
No |
Yes |
| ShortCodes |
No |
Yes |
| Extensions |
No |
Yes |
| Analytics under Posts (admin) |
Yes (limited) |
Yes |
| Analytify under Pages (admin) |
Yes (limited) |
Yes |
| Analytify under Custom Post Types (front/admin) |
No |
Yes |