better-studio / better-amp

Full Google AMP support for WordPress with custom themes and customizations
https://betterstudio.com/wp-plugins/better-amp/
GNU General Public License v2.0
19 stars 19 forks source link

Analytics can´t insert #20

Closed Lofesa closed 7 years ago

Lofesa commented 7 years ago

Hi @aliaghdam

If I put the analitics-id code in config, I get only this

<amp-analytics type=googleanalytics> </amp-analytics>

if leave blank the analytics-id code in the config not have these tags in html.

After digging in the issue, the plugins strip script tags, if I comment line 791 on file better-amp/includes/classes/class-better-amp-content-sanitizer.php the google analytics code get printed.

Lofesa commented 7 years ago

Hi @aliaghdam ..... and in footer.php you missed some ";"

"account": "<?php echo esc_attr( $ga_code ) ?>"

<?php endif ?>

lines 39 and 59

aliaghdam commented 7 years ago

Hi @Lofesa Thanks for reporting. This issue was updated with today update. (v1.1.2)