It is currently 4 December 2024, 21:57 Advanced search

Google Analytics

Questions and answers on how to best use Instant Developer

Google Analytics

Postby john w » 8 June 2023, 16:29

I need to confirm that if I want the Google Analytics to run I just add the tag info
After the head section of Desktop.Htm and Desktop_sm.htm

Do these page get overwritten when I publish or compile?


<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-3Cxxxxxx"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-xxxxxxxx');
</script>
Regards

John W
User avatar
john w
 
Posts: 821
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA

Re: Google Analytics

Postby john w » 8 June 2023, 16:37

I just tested it does get overwritten in compile. How do I stop that behavior?
Regards

John W
User avatar
john w
 
Posts: 821
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA

Re: Google Analytics

Postby d.termini » 9 June 2023, 6:36

Did you copy it in the custom dir?
d.termini
 
Posts: 1508
Joined: 13 November 2017, 8:41

Re: Google Analytics

Postby john w » 9 June 2023, 14:15

d.termini

I did not, will that work as a solution? I was not sure whether these pages were static or changed as the app changed.

If that works it will be great.

Thanks
Regards

John W
User avatar
john w
 
Posts: 821
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA

Re: Google Analytics

Postby ljwilson » 9 June 2023, 14:32

It will. They are built each time though, so when updating versions of inde you will have to revisit any changes made. You don't even need them listed in filelist.txt--they will automatically be copied from custom to your output folder.

...jack
ljwilson
 
Posts: 779
Joined: 26 November 2013, 14:15

Re: Google Analytics

Postby john w » 9 June 2023, 14:42

That answers both questions.

Thanks
Regards

John W
User avatar
john w
 
Posts: 821
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA


Return to Tips & Tricks

Who is online

Users browsing this forum: No registered users and 8 guests

cron