Best practice to paste Goolge Tags and Facebook Pixel code into website via database?
Would it be OK… if a client paste javascript into a database table to be used for google analytics and pixel good… is that good or bad practice. As they normally get these scripts to copy and paste into their sites… so would one create a “longtext” field and just let the user paste this into the table? and then just query that as per normal?
<script async src="https://www.googletagmanager.com/gtag/js?id=G-12346789sample"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-12346789sampleL');
</script>
yes, that was the idea… but looking at some of the clients codes… some use old analytics tags… others use other tracking software and need to paste in javascript… as i cannot cater i guess for each tracking software or custom js code… so i guess it will have to be that they can paste in script tags… eish… at least its password protected… and hopefully they will keep it secure…