content_head(); ?>

' . __( 'General settings', 'google-analytics-for-wordpress' ) . ''; echo '
'; $ga_class = Yoast_Google_Analytics::get_instance(); $wp_block_google = $ga_class->check_google_access_from_wp(); $check_google_access = $ga_class->check_google_access(); if ( $wp_block_google && $check_google_access ) { $profiles = Yoast_GA_Admin_Form::parse_optgroups( $yoast_ga_admin->get_profiles() ); $auth_url = Yoast_Google_Analytics::get_instance()->create_auth_url(); add_thickbox(); echo ''; echo "
"; if ( count( $profiles ) == 0 ) { echo '
'; echo ''; echo '' . __( 'Authenticate with your Google account', 'google-analytics-for-wordpress' ) . ''; echo '
'; echo '
'; echo ''; echo esc_html( $yoast_ga_admin->get_tracking_code() ); echo '
'; } else { echo Yoast_GA_Admin_Form::select( __( 'Analytics profile', 'google-analytics-for-wordpress' ), 'analytics_profile', $profiles, null, false, __( 'Select a profile', 'google-analytics-for-wordpress' ) ); echo ''; } echo '
'; echo '
'; echo ''; echo Yoast_GA_Admin_Form::input( 'text', null, 'google_auth_code', null, null ); echo ''; echo '
'; echo '
'; } else { echo '

' . __( 'Cannot connect to Google', 'google-analytics-for-wordpress' ) . '

'; if ( $wp_block_google == false && $check_google_access == false ) { echo '

' . __( 'Your server is blocking requests to Google, to fix this, add *.googleapis.com to the WP_ACCESSIBLE_HOSTS constant in your wp-config.php or ask your webhost to do this.', 'google-analytics-for-wordpress' ) . '

'; } else { echo '

' . __( 'Your firewall or webhost is blocking requests to Google, please ask your webhost company to fix this.', 'google-analytics-for-wordpress' ) . '

'; } echo '

' . __( 'Until this is fixed, you can only use the manual authentication method and cannot use the dashboards feature.', 'google-analytics-for-wordpress' ) . '

'; } echo ''; echo '
'; echo Yoast_GA_Admin_Form::input( 'text', null, 'manual_ua_code_field' ); echo '

' . __( 'Warning: If you use a manual UA code, you won\'t be able to use the dashboards.', 'google-analytics-for-wordpress' ) . '

'; echo '
'; echo '
'; ?>

_anonymizeIp' ) ); echo Yoast_GA_Admin_Form::select( __( 'Ignore users', 'google-analytics-for-wordpress' ), 'ignore_users', $yoast_ga_admin->get_userroles(), __( 'Users of the role you select will be ignored, so if you select Editor, all Editors will be ignored.', 'google-analytics-for-wordpress' ), true ); echo Yoast_GA_Admin_Form::input( 'checkbox', __( 'Disable analytics dashboard', 'google-analytics-for-wordpress' ), 'dashboards_disabled', null, __( 'This will completely disable the dashboard and stop the plugin from fetching the latest analytics data.', 'google-analytics-for-wordpress' ) ); ?>
' . __( 'Universal settings', 'google-analytics-for-wordpress' ) . ''; echo Yoast_GA_Admin_Form::input( 'checkbox', __( 'Enable Universal tracking', 'google-analytics-for-wordpress' ), 'enable_universal', null, sprintf( __( 'First enable Universal tracking in your Google Analytics account. Please read %1$sthis guide%2$s to learn how to do that.', 'google-analytics-for-wordpress' ), '', '' ) ); echo Yoast_GA_Admin_Form::input( 'checkbox', __( 'Enable Demographics and Interest Reports', 'google-analytics-for-wordpress' ), 'demographics', null, sprintf( __( 'You have to enable the Demographics in Google Analytics before you can see the tracking data. We have a knowledge base article in our %1$sknowledge base%2$s about this feature.', 'google-analytics-for-wordpress' ), '', '' ) ); echo Yoast_GA_Admin_Form::input( 'checkbox', __( 'Enhanced Link Attribution', 'google-analytics-for-wordpress' ), 'enhanced_link_attribution', null, sprintf( __( 'Add %1$sEnhanced Link Attribution%2$s to your tracking code.', 'google-analytics-for-wordpress' ), '', ' ' ) ); ?>
' . __( 'Advanced settings', 'google-analytics-for-wordpress' ) . ''; echo Yoast_GA_Admin_Form::select( __( 'Track downloads as', 'google-analytics-for-wordpress' ), 'track_download_as', $yoast_ga_admin->track_download_types(), __( 'Not recommended, as this would skew your statistics, but it does make it possible to track downloads as goals.', 'google-analytics-for-wordpress' ) ); echo Yoast_GA_Admin_Form::input( 'text', __( 'Extensions of files to track as downloads', 'google-analytics-for-wordpress' ), 'extensions_of_files', null, 'Please separate extensions using commas' ); echo Yoast_GA_Admin_Form::select( __( 'Track full URL of outbound clicks or just the domain', 'google-analytics-for-wordpress' ), 'track_full_url', $yoast_ga_admin->get_track_full_url() ); echo Yoast_GA_Admin_Form::input( 'text', __( 'Subdomain tracking', 'google-analytics-for-wordpress' ), 'subdomain_tracking', null, sprintf( __( 'This allows you to set the domain that\'s set by %1$s for tracking subdomains.
If empty, this will not be set.', 'google-analytics-for-wordpress' ), '_setDomainName' ) ); echo Yoast_GA_Admin_Form::input( 'text', __( 'Set path for internal links to track as outbound links', 'google-analytics-for-wordpress' ), 'track_internal_as_outbound', null, sprintf( __( 'If you want to track all internal links that begin with %1$s, enter %1$s in the box above. If you have multiple prefixes you can separate them with comma\'s: %2$s', 'google-analytics-for-wordpress' ), '/out/', '/out/,/recommends/' ) ); echo Yoast_GA_Admin_Form::input( 'text', __( 'Label for those links', 'google-analytics-for-wordpress' ), 'track_internal_as_label', null, 'The label to use for these links, this will be added to where the click came from, so if the label is "aff", the label for a click from the content of an article becomes "outbound-article-aff".' ); echo Yoast_GA_Admin_Form::input( 'checkbox', __( 'Tag links in RSS feed with campaign variables', 'google-analytics-for-wordpress' ), 'tag_links_in_rss', null, __( 'Do not use this feature if you use FeedBurner, as FeedBurner can do this automatically and better than this plugin can. Check this help page for info on how to enable this feature in FeedBurner.', 'google-analytics-for-wordpress' ) ); echo Yoast_GA_Admin_Form::input( 'checkbox', __( 'Allow anchor', 'google-analytics-for-wordpress' ), 'allow_anchor', null, sprintf( __( 'This adds a %1$s call to your tracking code, and makes RSS link tagging use a %2$s as well.', 'google-analytics-for-wordpress' ), '_setAllowAnchor', '#' ) ); echo Yoast_GA_Admin_Form::input( 'checkbox', __( 'Add _setAllowLinker', 'google-analytics-for-wordpress' ), 'add_allow_linker', null, sprintf( __( 'This adds a %1$s call to your tracking code, allowing you to use %2$s and related functions.', 'google-analytics-for-wordpress' ), '_setAllowLinker', ' _link' ) ); echo Yoast_GA_Admin_Form::textarea( __( 'Custom code', 'google-analytics-for-wordpress' ), 'custom_code', sprintf( __( 'Not for the average user: this allows you to add a line of code, to be added before the %1$s call.', 'google-analytics-for-wordpress' ), '_trackPageview' ) ); do_action( 'yst_ga_advanced-tab' ); ?>
' . __( 'Custom dimensions', 'google-analytics-for-wordpress' ) . ''; do_action( 'yst_ga_custom_dimensions_tab-content' ); ?>
' . __( 'Debug', 'google-analytics-for-wordpress' ) . ''; echo '
'; echo '

' . __( 'If you want to confirm that tracking on your blog is working as it should, enable this option and check the console of your browser. Be absolutely sure to disable debugging afterwards, as it is slower than normal tracking.', 'google-analytics-for-wordpress' ) . '

'; echo '

' . __( 'Note the debugging is only loaded for administrators.', 'google-analytics-for-wordpress' ) . '

'; echo '
'; echo Yoast_GA_Admin_Form::input( 'checkbox', __( 'Enable debug mode', 'google-analytics-for-wordpress' ), 'debug_mode' ); ?>
content_footer(); ?>