GTM4WP – A Google Tag Manager (GTM) plugin for WordPress
Google Tag Manager (GTM) is Google’s free tool for everyone to manage and deploy analytics and marketing tags as well as other code snippets using an intuitive web UI. To learn more about this tool, visit the official website. This plugin places the GTM container code snippets onto your WordPress website so that you do not need to add them manually. Multiple containers are also supported, and each container can have its own environment parameters, custom domain and custom path. The plugin complements your GTM setup by pushing page meta data and user information into the so-called data layer. Google’s official help pages include more details about the data layer. PHP 8.0 and WordPress 6.3 are required to use this plugin. GTM container code placement The original GTM container code is divided into two parts: The first part is a javascript code snippet that is added to the section of every page of the website. This part is critical to enable all features of GTM, and this plugin helps to place this part correctly on your site. The second part is an iframe snippet that acts as a failsafe/fallback should users’ JavaScript be disabled. Google recommends – for best performance – to place this code snippet directly after the opening tag on each page. Albeit not ideal, it will work when placed lower in the code. This plugin provides a code placement option for the second code snippet. If your WordPress theme is compatible with the additions of WordPress 5.2, then this plugin will place this second snippet in the right place. Users of the Genesis theme, GeneratePress theme, Elementor, Oxygen Builder and Beaver Builder Theme will also have it placed correctly. To utilize this, set the compatibility mode in the plugin options to off. All other users can place this second code snippet using custom PHP code (the “Manually coded” option), or select the so-called “Footer” option to add the code lower on the page (this is not the recommended way, but it will work). Basic data included post/page titles post/page dates post/page category slugs post/page tag slugs post/page author ID and name post/page ID post types post format post count on the current page + in the current category/tag/taxonomy custom terms associated with any post type logged in status logged in user role logged in user ID (to track cross device behavior in Google Analytics) logged in user email address (both unhashed and SHA256 hashed values to be used with tracking) logged in user creation date site search data site name and id (for WordPress multisite instances) IP address of the visitor (please obtain the visitor’s explicit consent before using this) post author data from PublishPress Authors, including co-authors and guest authors Content & engagement data Optional page variables that help with behavior tracking and Google Analytics 4 content grouping: content word count and estimated reading time last modified date and content age in days comment count and comment status page template, featured image presence, page hierarchy and sticky flag primary category, detected from Yoast SEO or Rank Math page language, detected from WPML or Polylang Browser / OS / Device data browser data (name, version, engine) OS data (name, version) device data (type, manufacturer, model) Data is collected in the browser using User-Agent Client Hints and pushed as a gtm4wp.deviceData event. Note that Safari and Firefox expose less detail than Chromium based browsers. Media player events Track users’ interactions with any embedded media: YouTube Vimeo Soundcloud HTML5 audio and video Dailymotion Mixcloud Cloudflare Stream Wistia JW Player VideoPress Spotify Twitch You can choose to fire data layer events when the media player loads, when the media is played, when it is paused or stopped, and optionally when the user reaches 10, 20, 30, …, 90, 100% of the media duration. Each event also populates Google Tag Manager’s built-in Video variables (Video Status, Video URL, Video Title, Video Provider, Video Duration, Video Current Time, Video Percent, Video Visible). Tracking is supported for embedded media using the built-in oEmbed feature of WordPress, as well as most other media plugins and copy/pasted embed codes. Players inserted into the page after it has loaded (for example in a popup, a lightbox or via AJAX) can also be tracked by turning on the optional “Track dynamically inserted players” setting. Tag restrictions: allowlist & blocklist Tag Manager tags, triggers and variables To increase website security, you have the option to allowlist or blocklist tags, triggers and variables. You can prevent specific tags from firing, or prevent the use of certain variable types, regardless of your GTM setup. If the Google account associated with your GTM account is compromised, an attacker could easily execute malware on your website without accessing its code on your hosting server. By blocklisting custom HTML tags, custom JavaScript variables and sandboxed scripts (custom tag and variable templates), you can secure the Tag Manager container. Integration Google Tag Manager for WordPress integrates with several popular plugins. More integrations to come! Contact Form 7: fire an event when a form is submitted with any result (mail sent, mail failed, spam detected, invalid input, submission aborted or terms not accepted). Optionally push the Google Analytics 4 recommended form events (form_start, form_submit, generate_lead) as well WooCommerce: Implementation of GA4 E-commerce Support for the Cart, Checkout, Mini-Cart, Product Collection and cross-sell blocks, not only the classic shortcode based pages Enhanced Conversions user data on the purchase event for Google Ads Compatibility with High Performance Order Storage (HPOS) Does not support promotions, since WooCommerce does not have such a feature (yet) Does not support refunds CheckoutWC: optional support for its multi step checkout template PublishPress Authors: co-author and guest author data in the page variables AMP: load your AMP container on the AMP version of your pages Google Consent Mode v2: fire the “default” command with specific consent flags to integrate with non-certified Consent Management Platforms (CMPs) and plugins Cookiebot: use automatic cookie blocking mode if needed Axeptio: load the Axeptio SDK and push every consent change into the data layer CookieYes: push a data layer event whenever the visitor’s consent changes Server side containers If you are using a server side container, you can enter your custom domain name and custom path to load gtm.js from there. Both can be set per container, so you can mix server side and standard containers on the same site. Cache-safe data layer (experimental, off by default) On sites using a full page cache (LiteSpeed, WP Rocket, Varnish, Cloudflare APO), the HTML generated for one visitor is served to everyone else as well. Any visitor specific value written into the data layer would therefore leak to other visitors – the classic example being a page cached while an editor was logged in, then served to anonymous visitors with that editor’s email address and role still in the data layer. When this option is enabled, no visitor or session data is written into cacheable HTML at all. Those values are delivered in the browser instead, under the same data layer variable names, so your existing Google Tag Manager setup keeps working. Export & import your settings You can export all plugin settings into a JSON file and import them on another site, which makes it easy to roll out the same configuration across several websites. Imported files are treated as untrusted and every value is validated before it is stored. Exclude specific user roles from being tracked You can set which user roles need to be excluded from tracking when a user with that role visits the frontend. This will completely disable the container code for that user. Staging and development sites The container can be limited to production environments only, so a cloned or staging copy of your site does not send data into your production Google Tag Manager container. This relies on the WP_ENVIRONMENT_TYPE setting of WordPress. For developers Version 2.0 is a complete object oriented rewrite. Every feature is a module, and third party plugins can register their own modules through the gtm4wp_register_modules action. All public template functions, filter and action names, wp-config constants and the option storage key of the 1.x versions are unchanged, so existing integrations keep working.
Top keywords
- data23×1.66%
- page19×1.37%
- code14×1.01%
- google14×1.01%
- tag12×0.87%
- container11×0.79%
- post11×0.79%
- user11×0.79%
- video10×0.72%
- custom9×0.65%
- data layer9×0.65%
- gtm9×0.65%
WPForms – AI Form Builder for WordPress – Contact Forms, Payment Forms, Survey Form, Quiz & More
WordPress Contact Form Builder Plugin WPForms is an AI drag & drop WordPress form builder that’s EASY and POWERFUL. Create contact forms, feedback forms, subscription forms, payment forms (including Stripe, Square & PayPal), and other types of forms for your site in minutes with just a few clicks! At WPForms, user experience is our #1 priority. Our pre-built form templates and workflows make WPForms the most beginner-friendly contact form plugin on the market. You don’t have to hire a developer. Create a form in less than 5 minutes with our drag & drop form builder, using a template or just asking AI to get a head start. WPForms Pro This plugin is the Lite version of WPForms Pro, which comes with email subscription forms, multi-page contact forms, file uploads, conditional logic, and extra payment integrations. Click here to purchase the best premium WordPress contact form plugin now! AI-Powered Drag & Drop Contact Form Builder Create custom contact forms in minutes with our easy-to-use drag and drop online form builder or just ask AI to build it for you. But don’t just take our word for it. See what WordPress experts are saying: WPForms is by far the easiest form plugin to use. My clients love WPForms and it’s one of the few plugins they can use without any training. As a developer I appreciate how fast, modern, clean and extensible it is. Bill Erickson – Expert WordPress Consultant Pre-built Form Templates WPForms comes with 2100+ pre-built form templates. Whether you’re looking to create a simple contact form, marketing form, request a quote form, donation form, payment order form, registration form, survey form, quiz form, Stripe payment form, or a subscription form, we have a form template already prepared and ready to use. Mobile Ready, SEO Friendly, and Optimized for Speed WPForms contact forms are 100% responsive and mobile-friendly. We optimized every query on the frontend and the backend to ensure that it’s one of the fastest WordPress contact form plugins. You can embed your contact form on any page with an optimized title and description, so WPForms is one of the most SEO friendly contact form plugins too. Fields & Features You Need to Succeed With star ratings, file uploads, repeater fields, survey fields, and multi-page contact forms, you can easily build the right custom form for your site’s needs. Plus, integrate your contact forms with an email marketing service in just a few steps and collect payments with Stripe, PayPal, and Square for bookings and orders without the need for a dedicated eCommerce plugin. See what one business owner has to say about their WPForms contact form: As a business owner, time is my most valuable asset. WPForms allows me to create smart contact forms with just a few clicks. With their pre-built form templates and the drag & drop builder, I can create a new form that works in less than 2 minutes without writing a single line of code. Well worth the investment. David Henzel – Co-founder of MaxCDN Surveys & Polls Create custom survey forms like Survey Monkey. Our WordPress survey plugin addon comes with smart survey fields including Likert scale, star ratings, and NPS. Embed your surveys and polls anywhere in WordPress. Use our survey reporting tools to customize graphs, export them for presentations, and display aggregate results. You can also share poll results instantly when collecting votes. Default WordPress Forms Aside from building simple contact forms, WPForms also helps you create better default WordPress forms, like custom WordPress login forms and custom WordPress user registration forms. Create a password-protected contact form or even a members-only contact form. Bloggers and publishers can use our WordPress post submission forms to accept guest posts, testimonials, and more. Payment Forms, Donation Forms, Booking Forms, and More While WPForms started out as a contact form plugin, it has evolved into a powerful custom forms solution for any type of payment or booking form. WPForms integrates with PayPal, Stripe, Square Payments, Authorize.Net, and Mercado Pago so you can easily accept credit card payments or take payments via PayPal. Bonus: you can also take signatures. We’re proud to be a Stripe Verified Partner. This partnership allows us to build the best Stripe integration with early access to features. You can use our Stripe integration to accept both one-time payments as well as recurring payments while syncing all form data to your Stripe account. Custom Calculator Forms Using the WPForms Calculations addon, you can build custom formulas and display results on the frontend. Create simple arithmetic calculations or build complex conditional calculations with rounded values, averages, time ranges, and more! It’s the best calculator plugin for WordPress. Forms Optimized for Conversions With our Form Pages addon, you can create distraction-free custom form landing pages to increase conversions. To improve form completion rates, we created Conversational Forms which helps you make your feedback forms feel more human by adding an interactive layout. (See Conversational Forms Demo). Easy to Customize and Extend You can easily customize your contact forms with our section dividers, HTML blocks, and CSS. Embedding forms in Elementor and Divi has never been easier thanks to our native integrations. We also know that our developer friends may want more control, so we added tons of hooks and filters. Full WPForms Feature List Online form builder – powerful drag & drop contact form builder. Create WordPress contact forms, payment forms, and other online forms without writing any code. 100% mobile responsive. GDPR friendly. Payment Forms – Take payments, donations, down payments, recurring payments, service payments with our Stripe (FREE) integration. Form templates pre-built and ready to import. Form styling for fields, labels, and buttons. Spam protection built in, plus integrations with hCaptcha, Google reCAPTCHA, and Cloudflare Turnstile. AI Forms to automatically create and refine forms through natural conversation. Instant form notifications via email. Custom form confirmations with success messages or thank you pages. Smart phone field that adapts to your visitor’s location. AI Choices to automatically populate Multiple Choice, Checkboxes, and Dropdown field options. Coupons for free shipping and sale discounts. Calculator forms for payment, shipping, billing, and more. File upload fields for user submissions. Multi-page forms with progress bars. Smart conditional logic to show or hide fields. Repeater field that enables the person filling out the form to easily add another field or group of fields to fill out. Perfect for group registration forms, custom order forms, and more. Signatures for agreements or payment forms. User registration forms and custom login forms. Post submission forms to collect user-generated content. Geolocation to collect location data along with submissions. Surveys and Polls with interactive reports. Quizzes with graded tests, personality quizzes, and scored assessments, plus AI-generated questions. Form abandonment detection to collect partial form submissions. Form locker to control access using passwords, dates, and more. Offline forms to collect submissions without an internet connection. Form landing pages to boost conversions. Conversational forms to boost overall completion rates. Lead forms to get more submissions with multi-step layouts. Webhooks to send data without third party connectors. User Journey reports so you know which content is driving form conversions. Save and Resume to let visitors save and come back later. Entry Automation to export and delete form entries on a daily, weekly, or monthly basis. Integrations Google Sheets Zapier PayPal Commerce Stripe – We’re a Stripe Verified Partner for Payments. Square Authorize.Net Mercado Pago Mailchimp AWeber Campaign Monitor GetResponse Constant Contact Airtable Notion Drip ActiveCampaign HubSpot Brevo MailerLite MailPoet ConvertKit Klaviyo SendGrid Salesforce Slack Dropbox Google Calendar Google Drive Twilio Pipedrive Make Zoho CRM You can see why WPForms is the best WordPress contact form plugin on the market! Want to unlock these features? Upgrade to our Pro version. Credits This plugin is created by Syed Balkhi. Branding Guidelines WPForms® is a registered trademark of WPForms LLC. When writing about the contact form plugin by WPForms, please make sure to uppercase the initial 3 letters. WPForms (correct) WP Forms (incorrect) wpforms (incorrect) wpform (incorrect) Notes WPForms is absolutely, positively the most beginner-friendly WordPress contact form plugin on the market. It is both easy and powerful. We took the pain out of creating online forms and made it easy. Check out all WPForms features. Also, I’m the founder of WPBeginner, the largest WordPress resource site for beginners. It was a huge priority for me to make a WordPress contact form plugin that beginners can use without any training. I feel that we have done that here. I hope you enjoy using WPForms. Thank you, Syed Balkhi