Skip to content
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

Google Analytics TrackingID is stored in lowercase #3318 #3322

Merged
merged 1 commit into from
Nov 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public bool SaveConfig(int portalId, IDictionary<string, string> values, ref boo
}
else
{
trackingID = values["TrackingID"] != null ? values["TrackingID"].ToLowerInvariant().Trim() : string.Empty;
trackingID = values["TrackingID"] != null ? values["TrackingID"].ToUpperInvariant().Trim() : string.Empty;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
trackingID = values["TrackingID"] != null ? values["TrackingID"].ToUpperInvariant().Trim() : string.Empty;
trackingID = values["TrackingID"] != null ? values["TrackingID"].Trim() : string.Empty;

Should this just allow for whatever casing is used? Is there a reason to upper-case it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@david-poindexter I see your comment on #3318, which seems to say that the code should allow any case to be saved, rather than forcing uppercase. Am I missing something?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for my clunky wording @bdukes - that's what I getting for rushing. 😆

It is CURRENTLY respecting case and saving the TrackingID value just as entered by the admin. However, this is causing a problem with Google Analytics functionality. It needs to be UPPERCASE in order to work as expected.

urlParameter = values["UrlParameter"]?.Trim() ?? string.Empty;
trackForAdmin = values["TrackAdministrators"] != null ? values["TrackAdministrators"].ToLowerInvariant().Trim() : string.Empty;
anonymizeIp = values["AnonymizeIp"] != null ? values["AnonymizeIp"].ToLowerInvariant().Trim() : string.Empty;
Expand Down