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:

  1. Piggyback on the "Generator" meta tag string, appending "; Commerce 2" (or whatever the major version is) to the string.
  2. Define an additional custom header similar to the x-generator header called x-commerce-core with the major version number.

Once implemented in Commerce 2.x, this should be backported to Commerce 1.x.

Comments

rszrama created an issue. See original summary.

rszrama’s picture

Two 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.

jsacksick’s picture

Status: Active » Needs review
StatusFileSize
new3.15 KB
rszrama’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me!

  • jsacksick committed b35e464 on 8.x-2.x
    Issue #3220338 by jsacksick, rszrama, dwkitchen: Identify Commerce Core...
jsacksick’s picture

Issue tags: +Needs backport to D7
rszrama’s picture

Version: 8.x-2.x-dev » 7.x-1.x-dev
Status: Reviewed & tested by the community » Active

I'll tackle it for Commerce 1.x.

rszrama’s picture

Status: Active » Needs review
StatusFileSize
new652 bytes

Much simpler in Drupal 7. 😅

rszrama’s picture

Status: Needs review » Fixed

Committing and tagging the release. 🤘🏼

  • rszrama committed 7b99374 on 7.x-1.x
    Issue #3220338 by rszrama: Identify Commerce Core via site generator...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.