Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task
archon810 opened this issue Apr 17, 2025 · 0 comments

Comments

@archon810
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant