DMS3 QR Manager

By Marc Queralt i Bassa

10+ active installationsVersion 20261118.0852

Manage QR codes as a custom post type with trackable redirects, visit statistics, SVG download, and optional QR Docs.

Description

DMS3 QR Manager lets you create and manage QR codes in WordPress. Each QR points to a URL on your own site (/qr/{slug}) that records visits and redirects visitors to a final destination. Printed QR codes stay valid when you change the destination in the admin.

Optionally enable QR Docs: hierarchical support documents at /qr-docs/{slug}/, with a QR campaign taxonomy and a “Do not index in search engines” control that writes Rank Math and Yoast SEO metas.

Features

  • Custom post type qr-code with slug, destination URL, and optional UTM campaign per QR
  • REST API: qr-code is available at /wp/v2/qr-code with metas _dms3_qr_destination_url and _dms3_qr_utm_campaign, plus readonly field dms3_qr_public_url (useful for MCP and API clients); optional qr-doc and taxonomy qr_campanya are also in REST when QR Docs is enabled
  • Public redirect URLs: {home_url}/qr/{slug}?utm_...
  • Bridge page before redirect (default 1 second) so Google Analytics can load via wp_head()
  • Manual fallback link: “Skip to …” if automatic redirect fails
  • Internal visit tracking with date-range statistics (anonymous scan timestamps only)
  • Global UTM defaults (utm_source, utm_medium, default campaign)
  • utm_content is always set automatically to the QR slug
  • SVG QR preview and download from the list screen and single QR edit screen
  • Bulk SVG download as a ZIP file ({slug}.svg per code)
  • WPML: qr-code is excluded from translation
  • Optional QR Docs (qr-doc) behind Settings → Enable QR Docs
  • Admin menus: QR Manager followed immediately by QR Docs
  • Public doc URLs: {home_url}/qr-docs/{slug}/ (WordPress-standard rewrite)
  • Taxonomy qr_campanya (QR campaigns) for grouping docs (does not change the doc permalink)
  • “Do not index in search engines” (default on): writes rank_math_robots and Yoast _yoast_wpseo_meta-robots-noindex / nofollow metas
  • Slug guard for QR Docs: no automatic -2 suffix; admin notices on URL conflicts

How redirects work

Scanned URL example:

https://example.com/qr/wikipedia?utm_source=qr&utm_medium=offline&utm_campaign=port_vendrell&utm_content=wikipedia
  1. Visitor hits /qr/wikipedia
  2. A lightweight bridge page loads (HTTP 200) with analytics scripts
  3. After the configured delay, the browser redirects to the destination URL
  4. The visit is logged in the plugin database

Temporary client-side redirects are used instead of HTTP 301 so every scan hits your server and destination URLs can be updated without reprinting QR codes.

Privacy

When someone scans a published QR code, the plugin stores only the internal QR identifier and the scan timestamp. It does not store IP addresses, HTTP referrers, or plugin-specific cookies. Visit data is used for admin statistics only.

Third-party libraries

QR images are generated with bundled PHP libraries (MIT licensed):

The vendor/ directory is included in the plugin package.

Uninstall

When the plugin is deleted (not merely deactivated), the visit statistics table and plugin options are removed. QR code posts (qr-code) are kept as regular WordPress content.

Installation

  1. Upload the dms3-qr-manager folder to /wp-content/plugins/
  2. Activate the plugin through the Plugins menu in WordPress
  3. Go to QR Manager → Settings and configure global UTM parameters and redirect delay
  4. Create QR codes under QR Manager → All QR
  5. Publish each QR — draft codes return 404 on the public URL
  6. If /qr/{slug} URLs do not work, visit Settings → Permalinks and click Save Changes to flush rewrite rules
  7. To use support documents, enable QR Docs under QR Manager → Settings, then create docs under QR Docs. Point QR destinations to /qr-docs/{slug}/ as needed.

Composer dependency

If you build from source, run composer install --no-dev inside the plugin folder to populate vendor/.

FAQ

Why is my QR URL returning 404?

The QR must be Published (not draft). The slug in the admin must match the URL path. Flush permalinks under Settings → Permalinks.

How do QR Docs work?

Enable them under QR Manager → Settings. Each QR Doc is a normal hierarchical page-like post at /qr-docs/{slug}/. Assign an optional QR campaign for organization only. Use Do not index in search engines (on by default) so Rank Math and Yoast store noindex; those plugins then keep the URL out of the sitemap.

Can I change the destination without reprinting the QR?

Yes. Update the destination URL in the admin. The public /qr/{slug} URL stays the same.

Does Google Analytics track QR scans?

The bridge page loads your theme/plugin analytics scripts before redirecting. For same-site destinations with “Forward UTM” enabled, UTM parameters are also appended to the final URL. Internal statistics are always recorded by the plugin regardless of GA.

What data does the plugin collect?

Each scan logs the QR post ID and timestamp. No IP address or HTTP referrer is stored. See Settings → Privacy in WordPress for the full policy text added by this plugin.

Can I use the REST API or MCP with QR codes?

Yes. Authenticated users with permission can list and edit qr-code posts via /wp/v2/qr-code. Registered metas include destination URL and UTM campaign; the response also includes dms3_qr_public_url. When QR Docs is enabled, qr-doc and qr_campanya are available under the REST API as well. The classic editor in wp-admin is unchanged.

Is the QR post type translatable with WPML?

No. QR codes are language-independent by design.

What happens when I uninstall the plugin?

The statistics table and plugin settings are deleted. Your qr-code posts remain in WordPress unless you delete them manually.

What PHP extensions are required?

PHP 8.2+ and ZipArchive for bulk SVG download.

Changelog

20261118.0852

  • Optional QR Docs: CPT qr-doc, URLs /qr-docs/{slug}/, taxonomy QR campaigns
  • Settings toggle Enable QR Docs (off by default) with rewrite flush on change
  • Do not index in search engines checkbox writes Rank Math and Yoast metas
  • Slug conflict guard for QR Docs without automatic -2 suffixes

20260712.2127

  • Bundled Catalan (ca) and Spanish (es_ES) translation files in the plugin package

20260712.2112

  • Internationalization: English source strings with bundled Catalan (ca) and Spanish (es_ES) translations
  • Added load_plugin_textdomain() for admin and frontend strings

20260710.1000

  • WordPress.org review: unified class prefixes under Dms3_Qr_Manager_*
  • Updated chillerlan/php-qrcode to 6.0.1; minimum PHP is now 8.2
  • Removed non-essential vendor files from distribution package

20260707.1200

  • Plugin Check compliance: literal i18n text domain, SVG escaping, WP_Filesystem for ZIP downloads
  • Tested up to WordPress 7.0

20260707.1100

  • WordPress.org compliance: GPL license file, ABSPATH guards, privacy policy integration
  • Removed HTTP referrer from visit logging
  • Clean uninstall (database table and options)
  • Bridge page assets enqueued via WordPress APIs

20260607.1730

  • Bridge redirect page with configurable delay (default 1 second)
  • “Skip to …” manual fallback button
  • Google Analytics support via wp_head() on bridge page
  • Per-QR UTM campaign with global fallback; utm_content auto-set to slug
  • SVG preview and download on list and edit screens
  • Bulk SVG download as ZIP
  • Visit statistics with date range filter
  • WPML exclusion for qr-code post type