-
Notifications
You must be signed in to change notification settings - Fork 293
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
Follow API naming conventions for ID field names #6484
Comments
@felixarntz (from the description) – would this not still be a deviation from the API names? If we need to disambiguate the setting from others without getting into a multi-dimensional structure it might be better to do something like |
@aaemnnosttv I don't think we need to be that strict. For example We can use a different name, but my point is more that the terminology should be the same. It should be clear when seeing the Google API documentation and looking at our settings what is what. For example, for https://developers.google.com/tag-platform/tag-manager/api/v2/reference/accounts/containers#resource-representations:
With the above 3 examples, I don't think there is any ambiguity. Where we are today this is far more confusing:
|
AC SGTM 👍
@felixarntz for this one, while it doesn't affect this issue, it would be good to align on the convention going forward – why not use |
I think we should always ensure that it is clear what the ID is referring to. If we just use Essentially, the convention I'm thinking about is:
|
IB ✅ |
QA Update ✅
|
For consistency with older Site Kit code (e.g. our Analytics
internalWebPropertyID
in the API is just the "property ID", while our Tag ManagercontainerID
in the API is the "public container ID"), #6319 (comment) led us to calling a GTE "container ID"internalContainerID
. This is good for consistency with that existing Site Kit convention, but it's also worth considering that in all of those cases we are being inconsistent with the Google API naming conventions.I believe in the long term it makes more sense to align with the API naming conventions than to keep following our own derived convention, which is more confusing than helpful particularly when referring to e.g. API docs.
This issue is for simply following the API naming conventions in the scope of the new GTE work. For example
internalContainerID
should be renamed tocontainerID
, since that's what it is in the API. If we ever need the public container ID for GTE (which we probably don't), we would need to call itpublicContainerID
.In the future, we can also align the older Site Kit code that is not following the API naming conventions, as follows:
containerID
topublicContainerID
("GTM-...") andinternalContainerID
tocontainerID
(numeric ID), since that's what those IDs really are. This would also need to involve some migration routine so that the older setting value in the database is maintained correctly.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
containerID
instead ofinternalContainerID
. This is partially already the case, but e.g. in theGET:container-destinations
REST data point it is not.Implementation Brief
Google\Site_Kit\Modules\Analytics_4
class:GET:container-destinations
route, change theinternalContainerID
parameter tocontainerID
.assets/js/modules/analytics-4/datastore/containers.js
fetchGetGoogleTagContainerDestinationsStore
.Test Coverage
QA Brief
gteSupport
flag.Changelog entry
The text was updated successfully, but these errors were encountered: