Exclude WordPress Admin traffic using Google Tag Manager without any Plugins

Standard

Exclude admin(WordPress) users from being tracked using Google Tag Manager Without Any Plugins

Recently I received a request from one of client they want exclude WordPress admin traffic using Google Tag Manager without any plugins on WordPress Back-end.

They said, they know few plugin in WordPress, does not want to use because its fully customized web site and Also large website so many bloggers updating content at the same time on the WordPress.

Why Should Exclude WordPress Admin Traffic From Google Analytics using Google Tag Manager without any Plugins and using Data Layer Placing Directly on the WordPress Back-end using Google Tag Manager.

They have already tried solution these solutions in WordPress to Exclude/Block Traffic in Google Analytic

  1. Blocking IP Address Excluding WordPress Admin TrafficUsing filters in WordPress Admin or Apply filter in Google Analytic, it fails when large number admin users access at the same time. and also users are using dynamic IP address.    

2. Dummy Cookie Concept – The cookie concept fails some country due laws of a cookie and also if some body disable cookie on there system, in that case solution is also fails 

Then I have decided to write a data Layer to exuding Admin traffic of WordPress using Google Tag Manager without any Plugins, Its took my time to find a solution and finally ended with solution of Excluding of Admin Traffic of WordPress using Google Tag Manager.

Step 1First Install Google Tag Manager on Your Website /Store

Copy the code below and paste it onto every page of your website. Place it immediately after the opening <body> tag.

<!– Google Tag Manager –>
<noscript><iframe src=”//www.googletagmanager.com/ns.html?id=GTM-XXXXXX
height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:
new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=
‘//www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,’script’,’dataLayer’,’GTM-XXXXXX‘);</script>
<!– End Google Tag Manager –>

Note: Make you will replace GTM Tracking Code with your GTM ID

Step 2Place DataLayer Code Place on functions.php in WordPress Back-end exclude to admin Traffic.

DataLayer Excluding in Google Tag Manager

Exclude WordPress Admin Traffic using Google Tag Manager without Any Plugins

Step 3Create  a Data Layer Variable to Track admin users to State “Logged-In” and “Logged-out” using without any plugin of WordPress

Exclude Admin Traffic using Google Tag Manager in WordPress

Step 4It’s time be Test the result using Google Tag Manager 

When Login WordPress Back-end 

Tracking When Users are Login in WordPress Back-end

When Login out WordPress Back-end

Exclude Admin Traffic in WordPress

Login out Visitor Tracking in WordPress exclude admin Traffic

Step 5It’s time check Result with Google Analytic and Implement Trigger in Google Tag Manager

Exclude Admin Visitor from the Website

When WordPress Back-end Login no visitor tracking in Google Anaytic

For Contact: mappchero@gmail.com

Warning:if you do n’t know about javascript or do n’t have developing knowledge then do n’t try to implement on exclude WordPress Admin Traffic using Google Tag Manager  that can broke your site, Cart and other functionality 

Disclaimer: Google tag manager belongs to Google property 

No Fields Found.

Contact Form 7 with Google Tag Manager without a Plugin in WordPress

Standard

Are you looking WordPress Contact Form 7 Submission/Ajax form Submission using Google Tag Manager

Are you looking to track Contact form 7 Successful form Submission Tracking using Google Tag Manager without plugin and using javascript or if you don’t login to your back-end of WordPress don’t need worry about it, Make sure you have already Place Google Tag Manager on the website.

One of Challenging part to track successful form submission on Contact form 7 Tracking in Google Analytic and lots of questions I have seen on the internet How to track success Contact 7 form submission on “track WordPress Contact Form 7 with Google Tag Manager” and Track WordPress Contact Form 7 with Google Tag Manager! And Some people written solution if you use the plugin of google tag manager “GTM Plugin for WordPress by DuracellTomi“, I am going to provide a solution track contact 7 form Submission using Google Tag Manager!

Why it’s more completed to tracking Contact form 7 submission using Google Analytic / Google Tag Manager, Because due to ajax based form Submission that’s alway will be challenging track on Google Analytic that will not track as usual other form submission for track ajax form using Custom Javascript or Redirect to thank You Page.

How to make Successfully form Submission Tracking using Google Tag Manager in WordPress Contact Form 7 with Google Tag Manager without a Plugin!

Step 1. First Install Google Tag Manager on Your Website /Store

Copy the code below and paste it onto every page of your website. Place it immediately after the opening <body> tag.

<!– Google Tag Manager –>
<noscript><iframe src=”//www.googletagmanager.com/ns.html?id=GTM-XXXXXX
height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:
new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=
‘//www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,’script’,’dataLayer’,’GTM-XXXXXX‘);</script>
<!– End Google Tag Manager –>

Note: Make you will replace GTM Tracking Code with your GTM ID

Step 2. Need to create a custom html javascrit to track contact us 7 form submission using without Plugin

Name of Custom HTML – Contact 7 Form Submission validation on submit

Contact Form 7 submit with Google Tag Manager

Contact Form 7 validation on submit using Google Tag Manager

Step 3. Triggering for “Contact 7 Form Submission validation on submit” without Plugin a tracking form submission using Google Tag Manager

Ajax Form Tracking Contact 7 Form Submission

Track Contact Form 7 Submissions in Google Analytics

Step 4. Create a variable for Track Contact 7 form submission using Google Tag Manager

Custom Variables for Contact 7 form Submission

WordPress contact form 7 variables using Google Tag Manager

Step 5. Create a Tag for Track to Contact 7 form Submission in Google Analytics using Google Tag manager.

Google Tag Manager Contact 7 Tags

Contact 7 For Tags for Google Tag Manager

Step 6. Trigger to track Contact 7 form Submission in Google Analytics using Google Tag manager.

Custom Event to track contact 7 form submission

Contact 7 form Submission fire on Custom Event

Step 7. Now time test contact 7 form submission on the website using Debug mode of Google Tag manager

Successfully Contact form 7 tracking

Tested on Contact form 7 Submission using Google Tag Manager

Step 6. Result Verify in Google Analytic for Contact 7 form Submission and Successfully tracking as event Google Analytic.

Contact 7 Form event Tracking in Google Analytic

Event Tracking in Google Analytic for Contact 7 Form

For Contact: mappchero@gmail.com

Warning:if you do n’t know about javascript or do n’t have developing knowledge then do n’t try to implement on contact 7 form submission using Google Tag Manager  that can broke your site, Cart and other functionality 

Disclaimer: Google tag manager belongs to Google property 

No Fields Found.