Tagged: x
-
AuthorPosts
-
May 5, 2016 at 5:41 am #914091
Matt NParticipantHi there,
My Google Analytics was working fine for a while, but is not anymore and I don’t know why.
I have re-pasted the following script in the javascript section of the customizer. However, it is still not working.(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-57703680-1', 'auto'); ga('send', 'pageview');Thank you in advance for your help.
Matt
May 5, 2016 at 5:42 am #914092
Matt NParticipantThis reply has been marked as private.May 5, 2016 at 11:03 am #914472
JoaoModeratorHi Matt,
We have a Google Analytics Addon specially made for that.
Please remove this code from the Customizer
Install the Analytics Addon at your Wp-Admin/ Addons / Extensions
Click on the addon (make sure it is enabled)
Select Enable Google Analytics
Paste your code below.
Please see attached image.
Hope that helps,
Joao
May 9, 2016 at 6:12 am #982051
Matt NParticipantHi Joao,
Thank you for your answer.
I have followed your advice last week. I have waited for a few days, but I still can’t see any statistics in my google analytics.Have I missed something?
Thanks.
Matt
May 9, 2016 at 8:33 am #982233
ChristianModeratorHey Matt,
I checked your site and looks like your setup is correct. Would you mind clearing all caches and deactivating all third party plugins then see if your analytics works? Next, you could try switching to the default 2016 theme and then test again.
Thanks.
May 11, 2016 at 10:38 am #986032
Matt NParticipantHi there,
I have cleared the caches and deactivating all my third party plugins, but i still can’t see any data in GA.
What do you mean by switching to the default 2016 theme?
Should i activate the X-theme instead of the X-Child ThemeThanks
Matt
May 11, 2016 at 12:16 pm #986193
RupokMemberHi Matt,
If you are using Child Theme then you can try switching to X first. If it’s still the same then activate 2016 to check if this is related to theme or not.
Cheers!
May 13, 2016 at 4:36 am #989425
Matt NParticipantHi There,
I now have a bigger issue. I have followed your advice.
Because Google Analytics was still not working, even with the Main Theme,, I have reactivated my child theme.
Unfortunately, now, I cannot reach my WordPress portal anymore.
“The page is not working”Could you please tell me what to do?
Thanks
Matt
May 13, 2016 at 4:54 am #989440
Matt NParticipantThis reply has been marked as private.May 13, 2016 at 5:13 am #989458
ChristopherModeratorHi there,
Please connect to FTP and update your child theme’s functions.php file to :
function x_get_content_layout() { $content_layout = x_get_option( 'x_layout_content', 'content-sidebar' ); if ( $content_layout != 'full-width' ) { if ( is_home() ) { $opt = x_get_option( 'x_blog_layout', 'sidebar' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } elseif ( is_singular( 'post' ) ) { $meta = get_post_meta( get_the_ID(), '_x_post_layout', true ); $layout = ( $meta == 'on' ) ? 'full-width' : $content_layout; } elseif ( x_is_portfolio_item() ) { $layout = 'content-sidebar'; } elseif ( x_is_portfolio() ) { $meta = get_post_meta( get_the_ID(), '_x_portfolio_layout', true ); $layout = ( $meta == 'sidebar' ) ? $content_layout : $meta; } elseif ( is_page_template( 'template-layout-content-sidebar.php' ) ) { $layout = 'content-sidebar'; } elseif ( is_page_template( 'template-layout-sidebar-content.php' ) ) { $layout = 'sidebar-content'; } elseif ( is_page_template( 'template-layout-full-width.php' ) ) { $layout = 'full-width'; } elseif ( is_archive() ) { if ( x_is_shop() || x_is_product_category() || x_is_product_tag() ) { $opt = x_get_option( 'x_woocommerce_shop_layout_content', 'sidebar' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } else { $opt = x_get_option( 'x_archive_layout', 'sidebar' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } } elseif ( x_is_product() ) { $layout = 'full-width'; } elseif ( x_is_bbpress() ) { $opt = x_get_option( 'x_bbpress_layout_content', 'sidebar' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } elseif ( x_is_buddypress() ) { $opt = x_get_option( 'x_buddypress_layout_content', 'sidebar' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } elseif ( is_404() ) { $layout = 'full-width'; } else { $layout = $content_layout; } } else { $layout = $content_layout; } return $layout; add_action('do_signup_header','add_signup_header_body_class'); function add_signup_header_body_class() { add_filter('body_class', 'add_registration_page_class'); } function add_registration_page_class($classes) { $classes[] = 'signup-header'; return $classes; } $mu_flag_login_page = false; add_action('signup_header','mu_flag_login_page'); function mu_flag_login_page() { global $mu_flag_login_page; $mu_flag_login_page = true; } function is_mu_login_page() { global $mu_flag_login_page; return $mu_flag_login_page; } add_filter('get_post_metadata','no_revslider_on_login_page',10,4); function no_revslider_on_login_page($null,$object_id,$key,$single) { if( ('_x_slider_above' == $key || '_x_slider_below' == $key ) && is_mu_login_page()) { return false; } return $null; } } add_action('x_after_view_global__content', 'add_post_tags'); add_action('x_after_view_global__content-the-content', 'add_post_tags'); function add_post_tags() { if( is_singular('post') ) { if ( has_tag() ) : ?> <footer class="entry-footer cf"> <?php echo get_the_tag_list( '<p><i class="x-icon-tags"></i> Tags: ', ', ', '</p>' ); ?> </footer> <?php endif; } }Hope it helps.
May 13, 2016 at 5:15 am #989461
Matt NParticipantThis reply has been marked as private.May 13, 2016 at 5:38 am #989488
ChristopherModeratorHi there,
Google analytics code is added in your site, please see the attachment.
You can also install google analytics plugin from X Addons page.
Hope it helps.
May 13, 2016 at 6:37 am #989560
Matt NParticipantProblem resolved.
Thanks a lot guys
May 13, 2016 at 7:44 am #989629
JoaoModeratorYou are welcome.
Let us know if you need further help with anything.
Joao
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-914091 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
