{"id":221703,"date":"2025-02-11T15:55:27","date_gmt":"2025-02-11T15:55:27","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/url-content-mapper\/"},"modified":"2025-12-17T17:30:07","modified_gmt":"2025-12-17T17:30:07","slug":"url-content-mapper","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/url-content-mapper\/","author":20304526,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.4","stable_tag":"1.4","tested":"6.8.5","requires":"5.0","requires_php":"7.2","requires_plugins":null,"header_name":"URL Content Mapper","header_author":"Wajahat Mubashir","header_description":"A WordPress plugin to dynamically add content groups in GA4 and inject code before GA4\/GTM in the head tag.","assets_banners_color":"072132","last_updated":"2025-12-17 17:30:07","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/wajahatmubashir.netlify.app\/","header_plugin_uri":"https:\/\/wajahatmubashir.netlify.app\/","header_author_uri":"https:\/\/www.linkedin.com\/in\/wajahatwritescode\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":1521,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0":{"tag":"1.0","author":"wajahatmubashir","date":"2025-02-11 15:40:29"},"1.1":{"tag":"1.1","author":"wajahatmubashir","date":"2025-09-28 17:24:05"},"1.2":{"tag":"1.2","author":"wajahatmubashir","date":"2025-09-28 18:47:01"},"1.3":{"tag":"1.3","author":"wajahatmubashir","date":"2025-10-09 14:23:18"},"1.4":{"tag":"1.4","author":"wajahatmubashir","date":"2025-12-17 17:30:07"}},"upgrade_notice":{"1.4":"<p>Improved content grouping for better organization.<\/p>","1.3":"<p>CRITICAL UPDATE: Fixes major timing issues causing &quot;(not set)&quot; content groups in GA4. This update ensures content_category is set before GA4 page_view events fire. Highly recommended for all users.<\/p>","1.2":"<p>This update adds import\/export functionality for easy settings migration between sites.<\/p>","1.1":"<p>This update improves content mapping of pages with parameters.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3239189,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3239186,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3239186,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3239186,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.2","1.3","1.4"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[232,238186,193472,23294],"plugin_category":[36],"plugin_contributors":[238187],"plugin_business_model":[],"class_list":["post-221703","plugin","type-plugin","status-publish","hentry","plugin_tags-analytics","plugin_tags-content-groups","plugin_tags-ga4","plugin_tags-google-tag-manager","plugin_category-analytics","plugin_contributors-wajahatmubashir","plugin_committers-wajahatmubashir"],"banners":{"banner":"https:\/\/ps.w.org\/url-content-mapper\/assets\/banner-772x250.png?rev=3239186","banner_2x":"https:\/\/ps.w.org\/url-content-mapper\/assets\/banner-1544x500.png?rev=3239186","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/url-content-mapper\/assets\/icon-128x128.png?rev=3239189","icon_2x":"https:\/\/ps.w.org\/url-content-mapper\/assets\/icon-256x256.png?rev=3239186","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>URL Content Mapper dynamically adds content groups in Google Analytics 4 and injects code before GA4 or Google Tag Manager scripts in the <code>&lt;head&gt;<\/code> tag of your WordPress site. This allows you to better organize and track user activity, ensuring that your analytics data is both accurate and comprehensive.<\/p>\n\n<!--section=installation-->\n<ol>\n<li><strong>Upload the plugin files<\/strong> to the <code>\/wp-content\/plugins\/wp-url-content-mapper\/<\/code> directory, or install the plugin through the WordPress plugins screen directly by uploading the zip file.<\/li>\n<li><strong>Activate the plugin<\/strong> through the 'Plugins' screen in WordPress.<\/li>\n<li><strong>Navigate to Settings<\/strong> \u2192 <strong>URL Content Mapper<\/strong> to configure the plugin.<\/li>\n<li>Once configured, the plugin automatically injects your custom code before GA4\/GTM scripts on every page load.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='does%20this%20plugin%20work%20with%20both%20ga4%20and%20gtm%3F'><h3>Does this plugin work with both GA4 and GTM?<\/h3><\/dt>\n<dd><p>Yes. It injects a script responsible for creating content groups before GA4 or GTM scripts, allowing you to set content groups more effectively.<\/p><\/dd>\n<dt id='will%20it%20slow%20down%20my%20site%3F'><h3>Will it slow down my site?<\/h3><\/dt>\n<dd><p>This plugin adds a minimal amount of code, so the impact on performance should be negligible. However, always test thoroughly on your environment.<\/p><\/dd>\n<dt id='where%20can%20i%20find%20the%20plugin%20settings%3F'><h3>Where can I find the plugin settings?<\/h3><\/dt>\n<dd><p>After activation, go to <strong>Settings<\/strong> \u2192 <strong>URL Content Mapper<\/strong> in your WordPress Admin panel.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.4<\/h4>\n\n<ul>\n<li>Improved content grouping for better organization<\/li>\n<\/ul>\n\n<h4>1.3<\/h4>\n\n<ul>\n<li>CRITICAL FIX: Removed DOMContentLoaded wrapper to fix GA4 timing issues<\/li>\n<li>CRITICAL FIX: Script now loads in HEAD instead of footer for proper execution order<\/li>\n<li>Fixed URL pattern matching to use pathname instead of full href<\/li>\n<li>Improved query parameter handling for patterns like \/?wizard=true<\/li>\n<li>Fixed sanitization to preserve relative URL patterns like \/products\/<\/li>\n<li>Removed duplicate script enqueuing for better performance<\/li>\n<li>Added \"pushed once\" logic to prevent multiple category assignments<\/li>\n<li>WordPress.org compliance improvements<\/li>\n<li>Better documentation and code comments<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Added import\/export functionality for easy settings backup and migration<\/li>\n<li>Enhanced admin interface with better user experience<\/li>\n<li>Added file validation and error handling for imports<\/li>\n<li>Improved security with WordPress nonces and capability checks<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Improved content group mapping logic<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial release: Adds the capability to inject code before GA4\/GTM scripts and configure content groups.<\/li>\n<\/ul>","raw_excerpt":"A simple plugin to dynamically add content groups in GA4 and inject code before GA4\/GTM scripts.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/221703","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=221703"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/wajahatmubashir"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=221703"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=221703"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=221703"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=221703"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=221703"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=221703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}