deprecate: mark BotSettings.GAToken as pointing to retired Universal Analytics - #97
Merged
Conversation
…ytics Universal Analytics was shut down by Google on 1 July 2024; the gamp Measurement Protocol v1 path no longer receives data. Add a Deprecated godoc notice directing users to wire a GA4 sink (e.g. github.com/strongo/analytics2ga4) via analytics.AddSender() instead. The field and all constructor parameters are retained for backward compatibility; no behaviour is changed. Add nolint:staticcheck to the backward-compat test to suppress SA1019 on the intentional deprecated usage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
trakhimenok
force-pushed
the
deprecate-gatoken
branch
from
July 28, 2026 11:28
e16eb48 to
4829935
Compare
GAToken is deprecated but the token value may still appear in legacy configs and should be redacted from error output regardless. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extend the nolint comment with deprecation context to trigger a fresh PR check run. All lint issues should now be resolved. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BotSettings.GAToken(inbotsfw/settings.go) is marked Deprecated via a godoc comment, explaining that the Universal Analytics gamp Measurement Protocol v1 path was shut down by Google on 1 July 2024 and directing users to wire a GA4 sink instead (e.g.github.com/strongo/analytics2ga4+analytics.AddSender()).NewBotSettings,NewBotSettingsWithContext) are retained unchanged for backward compatibility — no behaviour is altered.GAToken consumers still present in bots-fw
Two internal usages remain; they are harmless but noted here per the PR brief:
botsfw/settings.go:138—NewBotSettingsWithContextassignsgaTokentoGATokenand optionally reads it from an environment variable (<PLATFORM>_GA_TOKEN_<CODE>). The env-var lookup and the struct field assignment are left in place so existing deployments don't break.botswebhook/settings_test.go:39— test asserting thatGATokenround-trips through settings construction. Left unchanged.Neither path sends data anywhere in this package; they simply carry the token for downstream consumers to use. Downstream consumers should migrate to a GA4 sender.
Test plan
go fmt ./...— cleango build ./...— cleango test ./...— all packages pass🤖 Generated with Claude Code
https://claude.ai/code/session_01RdhN3imH93tZ3M2mz9oFGi