Clarify test_mode in README.md

Created on 24 January 2023, about 2 years ago
Updated 31 January 2023, almost 2 years ago

Problem/Motivation

Warning: this is rather nit-picky.

In README.md we find the following:

The 1x1 pixel can be disabled in test environments by adding a config setting to your settings.php file.

$config['vgwort.settings']['test_mode'] = TRUE;

I feel a bit silly now, but it took me a few moments to realize that enabling test_mode actually disables the pixel.

I guess I was a bit thrown by the idea that we disable something by enabling something else.

Proposed resolution

Maybe we could provide a little more explanation about what test_mode actually does, something like this:

For testing purposes, you may wish to comment out the 1x1 tracking pickel in the HTML output.
You can do this by setting test_mode to TRUE in your settings.php:

$config['vgwort.settings']['test_mode'] = TRUE;

Looking around for guidance on naming booleans, I came across this post, which I found useful:

https://www.serendipidata.com/posts/naming-guidelines-for-boolean-variables

After reading that I think another way forward would be to explicitly name the setting to better document what it does:

$config['vgwort.settings']['tracking_pixel_commented_out'] = TRUE;

... but I think this is probably over-kill in this case!

πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Documentation

Created by

πŸ‡©πŸ‡ͺGermany michaellenahan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024