Home › Forums › Jevelin Theme › Google Optimize Code Snippet
Home › Forums › Jevelin Theme › Google Optimize Code Snippet
Hi, I would like to install the Google Optimize code snippet. However, I can’t locate the google.gtag code in the header to edit my code to the one below: (May I know where is the Google Analytics code located within the theme so I can add in the Optimize ID as well?
<!– Global site tag (gtag.js) – Google Analytics –>
<script async src=”https://www.googletagmanager.com/gtag/js?id=UA-44125563-6″></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag(‘js’, new Date());
gtag(‘config’, ‘UA-44125563-6’, { ‘optimize_id’: ‘GTM-TFC3PP2’});
</script>
Hi @leeberty,
I hope you are well today and thank you for your question.
The code to display it is in the theme files but we don’t recommend you to edit it.
Instead of using theme options to add Google Analytics, please use the below solutions to use it on your site.
https://www.wpbeginner.com/beginners-guide/how-to-install-google-analytics-in-wordpress/
https://websitesetup.org/google-analytics-wordpress/
Best regards,
Shufflehound team