• Resolved strarsis

    (@strarsis)


    I have a notice in frontend:

    Notice: Undefined index: domain in /srv/www/web/app/plugins/google-analytics-dashboard-for-wp/front/tracking-analytics.php on line 82

Viewing 8 replies - 1 through 8 (of 8 total)
  • Please check these two options, under Settings -> General:

    WordPress Address (URL)
    Site Address (URL)

    Something is wrong with your settings, you should have: https://exampple.com. Where exampple.com is your domain.

    • This reply was modified 7 years, 6 months ago by Alin Marcu.
    Thread Starter strarsis

    (@strarsis)

    Thank you for your answer.

    I am not able to find these options in Google Analytics, ‘General Settings’.
    Only available options on the ‘General Settings’ are:

    – Clear Authorization
    – Clear Cache
    – Reset Errors

    – Select View: [www.example.com […]]
    […]

    – Theme Color

    – [On] automatic updates for minor versions (security and maintenance releases only)

    What can I further do to fix this error? It also causes issues with Cookie headers/login, I have to disable the plugin manually to access the admin backend area.

    On your left menu, go to Settings -> General. It’s the General settings screen of your blog.

    Thread Starter strarsis

    (@strarsis)

    Wordpress address: //192.168.8.107:3000/wp
    Website address: //192.168.8.107:3000

    Both are correct, I can view the site using the URLs.

    Wow, you don’t use a domain name? In that case, please disable all Events Tracking, because they are relying on domain names. You can disable them from Google Analytics -> Tracking Code -> Events Tracking. I will try to cover this case or at least to avoid the ugly PHP notice on a future release.

    Thread Starter strarsis

    (@strarsis)

    Thanks! I work on the site on a development server and transfer the changes to a production server (hostname is replaced with the real domain name) – hence the IP address.
    It would be a great addition if this plugin can detect a development(staging?) environment by the WP_ENV environment variable and disable tracking – but still allows configuration + debugging of tracking.

    • This reply was modified 7 years, 6 months ago by strarsis.

    Hi,

    Even in a development environment you should use the domain name, it would be much faster to move it to production if you do.

    You can set your hosts file to resolve your local IP to the desired domain name.

    Windows: c:\Windows\System32\Drivers\etc\hosts
    Linux: /etc/hosts
    Mac Os: /private/etc/hosts

    192.168.8.107 domain.com

    Thread Starter strarsis

    (@strarsis)

    Thanks for this trick.

    I use a script that replaces the development hostnames with domain names when transferring to production server (https://github.com/jasperf/trellis-sync) –
    hence no domain was used.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Notice: Undefined index: domain in […]’ is closed to new replies.