Viewing 15 replies - 1 through 15 (of 18 total)
  • Brian Jackson

    (@brianleejackson)

    This is just the plugin I have been needing! But same problem, local-ga.js is empty. So unfortunately can’t use.

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    It sucks that I didn’t get notifications of your support questions! I’m sorry the plugin didn’t work immediately for you.

    I’ll do some testing and get back to you this weekend!

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    It is correct that I deliver an empty ga-local.js file with the plugin. This is to prevent any incompatibilites with servers that don’t allow new files to be created by PHP instances.

    Could you try the following for me:

    0. Delete my plugin, if you haven’t already.
    1. Install WP Crontrol: https://ww.wp.xz.cn/plugins/wp-crontrol/
    2. Install my plugin
    3. Make sure you haven’t manually disabled wp_cron() in wp-config.php
    4. Check in the WP Crontrol queue if the wp_cron job is queued. If it hasn’t run already, run it manually.
    5. After that, check if ga-local.js is still empty. If not, then it is working properly.

    Would love to hear about your findings.

    Brian Jackson

    (@brianleejackson)

    Hey no problem. It’s new, so no biggie 🙂 I am super pumped about this plugin though. And happy to spread the word about it.

    Another suggestion. I prefer loading my Google JS in the footer. Would be nice to have an option to load in header or footer. If you load in header sometimes its not as accurate for event tracking and also sometimes Pagespeed insights will complain about prioritizing visible content.

    Thanks!

    Brian Jackson

    (@brianleejackson)

    K so I deactivated all my other plugins. Deleted the host locally plugin. Installed WP Control. Installed host locally plugin again. Ran CRON job manually. Still nothing.

    https://perfmatters.io/wp-content/plugins/host-analyticsjs-local/cache/local-ga.js

    Thanks

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    I just tested it on two other live sites, where it wasn’t installed before. It took a few minutes for the cron to run and the ga-local.js to become populated with code.

    What’s your sites’ URL? And could you provide me with admin logins? You can use the contact form on my site to send me a message.

    Brian Jackson

    (@brianleejackson)

    Ok, sent via contact form. Thanks

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    That’s a great suggestion! I’ll add it in a next release!

    Regarding your issue: your wp-cron isn’t functioning properly, which is a server related issue. I’ve emailed you asking for ftp credentials, because I need to check your .htaccess-file.

    Brian Jackson

    (@brianleejackson)

    I’m on Nginx, so no .htaccess file. I can’t give FTP at the moment because of how my VPS is setup. However, let me spin up a new dev VPS for testing. I’ll be in touch. Thanks again!

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    I’m actually thinking to add another option to the plugin that will remove the update script from wp-cron so every user can choose to manually add the update script to their crontab.

    Thread Starter Burhan Nasir

    (@burhandodhy)

    SO here the reason why this plugin not work on my end . You use short php opening tags that are “<?” in update_local_ga.php and update_analytics.php and these tags are removed in php 7 .you can check on link http://php.net/manual/en/language.basic-syntax.phptags.php .. after replacing short tag with php standard tag , this plugin works perfectly

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    Thank you for making me aware of the fact that I used short tags somewhere. I completely missed that.

    Short tags are still supported in PHP 7, but it “is discouraged since it is only available if enabled using the short_open_tag php.ini configuration file directive, or if PHP was configured with the –enable-short-tags option”.

    So, to increase compatibility I changed it to the regular opening tag. 🙂

    Thnx again for the heads up! I’m working on an update as we speak.

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    Please update your plugin to version 1.2 to enjoy the latest compatibility fixes! @brian, I’d recommend you do that, too. It might just resolve your issue and you wouldn’t have to setup a test-server! 😀

    Edit: currently the plugin only runs the cronjob immediately after plugin activation and after that once per day. After updating it will not immediately run the update script. I’m going to add that function in a next release, to further increase user friendliness. For now, after updating: deactivate the plugin and activate it again. You’ll see that the ga-local.js-file will be populated with the analytics.js-code.

    Brian Jackson

    (@brianleejackson)

    Awesome it works now! Populating the ga-local.js now 🙂 Thanks Daan. The only other thing I need is to load in footer. But no rush.

    Thanks again. I’m looking forward to using this plugin across my sites.

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    I’m going to add that in a next release. I promise you! 😊

Viewing 15 replies - 1 through 15 (of 18 total)

The topic ‘local-ga.js is empty’ is closed to new replies.