MediaRon / gravity-forms-google-analytics-event-tracking

Use event tracking with Google Analytics
https://wordpress.org/plugins/gravity-forms-google-analytics-event-tracking/
GNU General Public License v2.0
65 stars 14 forks source link

Script sometimes placed outside document root #34

Open acjbizar opened 5 years ago

acjbizar commented 5 years ago

Not sure what specifically causes this yet, but in one of the websites we run this plugin on, script is placed before the doctype. It appears the script inside the GFGAET::is_ga_only() check is echoed at run-time, and not put inside an object or variable. This causes the markup of the page to render like this:

<script>
...
</script>
<!doctype html>

Moreover, this way the script doesn’t actually work.