Howdy,
I’ve got an issue with Google Analytics event tracking. The code is getting injected when the page loads but when I check the GA Chrome debugger, I get the same error on every ad: “Uncaught SyntaxError: Unexpected token ,” .
Upon further troubleshooting, I’ve found that Adrotate is not properly labeling a value for each ad, so the events never get sent through. If I go to my stats settings in the AdRotate dashboard to change the GA values for clicks/impressions, the values just revert to the defaults (click value “1.00”, impression value “2.00”) upon confirming the settings update. Here is an example of what the debugger is showing – the eventValue field is left blank:
<img onload="ga('send', 'event', 'Banner', 'Impression', 'Ford Escapes - Homepage Strip 3.14.18', , {'nonInteraction': 1});" src="http://www.*********.net/images/ads/escapes-banner-3-14-18.jpg" />
Not sure what to do to fix this, but would love to be able to use GA to track ads.
This has already been addressed for the next version.
Thanks for your feedback.
https://ajdg.solutions/plugins/adrotate-for-wordpress/development/