Hi,
The plugin as it is won’t work for your site. Instead of ga, your Google Analytics script uses gaplusu, in this part (window,document,'script','//www.google-analytics.com/analytics.js','gaplusu')
.
You could use the plugin if you change the code a bit. Open in the folder js the file ga4wpjs.js and delete what is written there and copy and paste the code below into that file and safe it.
var _gaq=_gaq||[];var stFailbackDefaults={trackScrolling:true,stLogInterval:10,docTitle:window.document.title,cutOffTime:900,trackNoEvents:false,trackNoMaxTime:false};window.total_time=0;var stIntervalObj=null;function TrackingLogTime(a){return a[0]==50?(parseInt(a[1])+1)+":00":(a[1]||"0")+":"+(parseInt(a[0])+10)}function stInitializeControlVars(){if(typeof window.trackScrolling=="undefined"){window.trackScrolling=window.stFailbackDefaults.trackScrolling}if(typeof window.stLogInterval=="undefined"){window.stLogInterval=window.stFailbackDefaults.stLogInterval*1000}if(typeof window.docTitle=="undefined"){window.docTitle=window.stFailbackDefaults.docTitle}if(typeof window.cutOffTime=="undefined"){window.cutOffTime=window.stFailbackDefaults.cutOffTime}if(typeof window.trackNoEvents=="undefined"){window.trackNoEvents=window.stFailbackDefaults.trackNoEvents}if(typeof window.trackNoMaxTime=="undefined"){window.trackNoMaxTime=window.stFailbackDefaults.trackNoMaxTime}if(window.trackScrolling===true){setTimeout(function(){window.onscroll=function(){window.onscroll=null;gaplus("send","event","Scroll",window.docTitle,"scrolled")}},2000)}}if(window.trackNoEvents===false){function startTimeTracking(a){stInitializeControlVars();window.stIntervalObj=window.setInterval(function(){total_time+=10;if(window.trackNoMaxTime===true){total_time=1}if(window.total_time<=window.cutOffTime){a=TrackingLogTime(a.split(":").reverse());gaplusu("send","event","Time","Log",a)}else{window.clearInterval(window.stIntervalObj)}},(window.stLogInterval))}jQuery(document).ready(function(){startTimeTracking("00")})};
On the plugin’s settings page you need to tick this: “if you are using the Google Analytics by Yoast plugin AND Universal Tracking is enabled, choose this option”.
This will probably work. You’ll want to try it on one site first. The results should be seen the next day.
The disadvantage of this is that you’ll have to do the same thing after every plugin update…, but you could use the same code again. There are just not enough people who have the issue you have to make it a standard option on the settings page.
Let me know how it went.