Skip to content

Status page should not say "Snippet is inserted" on non-production environments when tag guard prevented insertion #10654

Open
@archon810

Description

@archon810

Feature Description

In 1.38, this was added:

1.38.0 * Add a new tag guard that prevents rendering tags for non-production environments. Props lukecav. See https://github.com/illogical-robot/apkmirror.com/issues/2054.

When trying to figure out why SiteKit no longer outputs its tags on our dev env, we spent ages until we found the reason and were able to override it with

add_filter('googlesitekit_allowed_tag_environment_types', function ($allowed_environments) {
    $allowed_environments[] = 'development';
    return $allowed_environments;
;
});

The reason it took so long is because SiteKit would insist that "Snippet is inserted" when it actually wasn't:

Image

Acceptance criteria

Display something other than "Snippet is inserted" when snippet is skipped for any reason.

Implementation Brief

Test Coverage

QA Brief

Changelog entry

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions