One of the perpetual challenges in communicating about the Drupal Commerce project to third party solution providers is accurately representing our site count. While d.o maintains some statistics, tools like BuiltWith that these external companies use to make decisions re: which communities / projects to support under represent Drupal Commerce because of the way Drupal works vs. the more formulaic hosted platforms. They're able to use the "Generator" meta tag to identify Drupal sites easily enough (even if that can still be disabled), but that gives no indication that Commerce may be present on the site.
My proposal here is two-fold:
- Piggyback on the "Generator" meta tag string, appending "; Commerce 2" (or whatever the major version is) to the string.
- Define an additional custom header similar to the
x-generatorheader calledx-commerce-corewith the major version number.
Once implemented in Commerce 2.x, this should be backported to Commerce 1.x.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 3220338-8.commerce_core_header.patch | 652 bytes | rszrama |
| #3 | 3220338-3.patch | 3.15 KB | jsacksick |
Comments
Comment #2
rszrama commentedTwo notes:
We can just hardcode the version number into the string for simplicity's sake.
My quick test re: appending to the Generator meta tag showed it could easily be done via
hook_page_attachments_alter(), but we should do something smarter than just reference static array keys.Comment #3
jsacksick commentedComment #4
rszrama commentedLooks good to me!
Comment #6
jsacksick commentedComment #7
rszrama commentedI'll tackle it for Commerce 1.x.
Comment #8
rszrama commentedMuch simpler in Drupal 7. 😅
Comment #9
rszrama commentedCommitting and tagging the release. 🤘🏼