Description
Integrating 51Degrees Device Detection with your website will allow you to make informed decisions about what content a user engages with and how it is displayed. Combining the information learned from your analytics data with real-time enhanced device data on your website will empower you to produce a page built for that specific device’s needs. Taking this one step further, you have an additional 280+ device properties available to enhance your user’s user experience. The possibilities are endless as to what you can do with the information – it’s remarkably powerful.
This plugin makes use of the 51Degrees Pipeline API to deliver various data intelligence services. You can also add custom dimensions to your Google Analytics solution which will enhance your analytical data. With 51Degrees you can capture data that Google Analytics doesn’t readily collect, such as detailed information on specific device hardware.
Features
Integration With Google Analytics
51Degrees plugin allows you to add the Device Data Properties as Custom Dimensions to Google Analytics in a seamless and useful manner. The integration is super simple and does not require the help of a developer to set up the integration. Once you integrate Google Analytics in WordPress using 51Degrees, you will be able to fetch the Custom Dimensions in the Google Analytics Custom Reports to get the useful insights.
Suspicious Activity Detection
Detect and redirect visitors who make too many requests in a short time window. Configure the threshold, time window, and redirect URL from the Suspicious tab in Settings > 51Degrees.
Dynamic Robots.txt with Crawler Detection
Use 51Degrees device detection to intelligently manage your robots.txt file and control crawler access. The plugin automatically detects crawlers and bad bots, then enforces access policies based on crawler type. Protect your site from unwanted scraping and DDoS attempts while allowing legitimate search engines and analytics crawlers to function normally.
Preference Management Platform (PMP)
Add a 51Degrees consent popup to your site. Visitors choose Standard, Personalized, or a publisher-defined alternative (e.g. “Remove ads”). The choice is stored client-side in localStorage — no cookies, no extra server round-trips. Configure the brand, the alternative button, and the terms/privacy URL from the PMP tab.
Publishers can react to the visitor’s choice by overriding a single global callback on their page:
window.onPMPCompletion = function (preference) { /* preference is 'standard' or 'personalized' */ };
The plugin ships a no-op default, so the popup works out of the box without any custom JavaScript.
Advanced Features and Developer Info
For advanced feature usage, including in-page value replacement and shortcodes, conditional display based on property values, and access to 51Degrees property data from PHP and JavaScript, see the project GitHub repository.
Reporting
Please submit any issues or problems to the GitHub repository issues page.
Screenshots





Blocks
This plugin provides 1 block.
- 51Degrees Conditional Group Block
Installation
Following way can be used to install 51Degrees WordPress Plugin.
Installation from within WordPress
- Visit
Plugins > Add New. - Search for
51Degrees. - Install and activate the 51Degrees plugin.
For instructions on how to install the plugin manually or by uploading a zip file, please see the plugin GitHub repository.
After activation
- Visit the new
51DegreesSettings menu. - To start using this plugin, you will need to create a
Resource Key. This enables access to the data you need via the 51Degrees cloud service. You can create aResource Keyfor free, using the configurator to select the properties you want.
For a demo video on how to use our configurator, click here.
Integration with Google Analytics (GA4)
The plugin uses Google Analytics 4. If your property still uses the deprecated Universal Analytics, create a GA4 property and a Web data stream in Google Analytics first; Universal Analytics was retired by Google on 2024-07-01 and is no longer reachable by this plugin.
- Open the
Google Analyticstab inSettings > 51Degreesand clickConnect Google Analytics. You will be redirected to Google’s consent screen — accept the requested permissions to give the 51Degrees plugin access to your GA4 properties (read + the ability to create Custom Dimensions). - On return, select your GA4 property from the
Analytics Account/Propertydropdown. The plugin automatically resolves your property’s first Web data stream and stores both the Property ID and the Measurement ID (G-XXXXXXX). - Check
Send Page Viewif you want a default Page View event to fire on each page along with the Custom Dimensions event. Skip this if another plugin already sends page views for the same property — otherwise events will duplicate. - Click
Save Changes. The Custom Dimensions screen appears. - Review the mapping. Each 51Degrees property gets a default GA4 parameter name (
<engine>_<property>) plus a dropdown of Custom Dimensions that already exist on the property — pick the default to auto-create, or pick an existing dimension to map onto it. - Click
Enable Google Analytics Tracking. The plugin creates the missing GA4 Custom Dimensions on the property (up to GA4’s per-property cap of 50 in the free tier) and starts emitting the inline gtag snippet on every page render. Custom Dimension values arrive as parameters on thefodevent.
The OAuth redirect is single-site only in this release. Multisite OAuth support is on the roadmap.
FAQ
-
Is the 51Degrees plugin free?
-
The 51Degrees plugin is free and open source. However Our Cloud Configurator contains both FREE and PAID properties. The properties you will need to pay for are shown with a dollar icon. You can buy what you need on our Pricing page.
-
What happens if I already use another plugin to integrate Google Analytics?
-
You can continue using your existing installed plugins to send Custom Dimensions or view Analytics Data along with the 51Degrees plugin.
-
Where should I submit my support request?
-
If you’re experiencing any issues, use the WordPress.org support forums. If you have a technical issue with the plugin where you already have more insight on how to fix it, you can also open an issue on GitHub.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“51Degrees” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “51Degrees” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.13
- Migrated the Google Analytics integration from Universal Analytics to Google Analytics 4. Universal Analytics was retired by Google on 2024-07-01 and the previous integration could no longer reach the underlying API; this release replaces it with GA4 Admin API + GA4 gtag.
- OAuth scope expanded from
analytics.readonlytoanalytics.editso the plugin can create the required Custom Dimensions on your GA4 property automatically. After upgrade, reconnect Google Analytics from the Google Analytics tab — the consent screen will ask you to authorize the new permission. - Custom Dimensions admin screen rebuilt around the GA4 model. The numeric “Index” column is gone; each 51Degrees property maps onto a GA4 event-parameter name. Existing Custom Dimensions on the selected property are listed so you can map onto them or auto-create new ones.
- Frontend tracking is now emitted entirely inline in
<head>. The previous release wrote two JavaScript files toassets/js/on every page render, which was race-prone under concurrent admin activity; that filesystem write is gone. - GA4’s per-property limit of 50 Custom Dimensions (free tier) is enforced upfront. The Enable Tracking action refuses to start a batch that would exceed it, with a notice explaining which properties to deselect.
1.0.12
- Replaced the deprecated Google “Out-of-Band” (OOB) OAuth flow (Google sunset January 2023) with a HMAC + PKCE-signed redirect through the 51Degrees relay.
- Existing Google Analytics connections must be reconnected after this upgrade. The plugin will surface an admin notice on first wp-admin load post-update.
- The new OAuth flow is single-site only in this release. Multisite OAuth support is on the roadmap.
- Hardened plugin uninstall: the OAuth state secret, migration version stamp, and the Google Analytics auth-date row are now removed on uninstall. Plugin deactivation is reversible and no longer wipes persistent OAuth data.
- Added a daily cleanup of orphan OAuth pending transients to keep wp_options small on sites with abandoned authorization attempts.
- FIX: /robots.txt is now always reachable to crawlers regardless of the configured robots-enforce policy. Previously, disallowed crawlers were 302-redirected when fetching /robots.txt itself, defeating the policy the file advertises (issue #60).
1.0.0
- Initial Release.
