0

So I have a website hosted on AWS S3 with added SSL protocol https://calc2burn.pl. I have added a Google Tag Manager scripts to the index.html file, but when I'm clicking preview on GTM site I receive message that it can't connect to website.

After clicking preview the Tag Manager opens up site in a new tab but nothing more happens. I've added my code correctly. I've been searching for solution for last 15 hours. I thought that maybe it's a problem with CloudFare and have modified script as instructed but that didn't help.

The weirdest thing is that once for 100 attempts to reconnect I've received a massage that it has connected to website but the actual Tag Manager account site showed that it's not connected.

  • I can't see any GTM code on calc2burn.pl - where did you include it?! – Ermiya Eskandary Nov 06 '21 at 12:07
  • The first one is added just after head opening tag and second is added just after body opening tag. And I'm 1000% sure that in the in the S3 bucket is correct index.html uploaded file with code in it. I also can't see code when I'm in the code view mode in Chrome. – yesitsmewojtek Nov 06 '21 at 12:39
  • Are you using any CloudFront/CloudFlare caching? If it's in S3 and not visible, it is being cached somewhere - clear the Cloudflare cache/invalidate CloudFront cache to make the new file load – Ermiya Eskandary Nov 06 '21 at 12:42
  • There is something weird with this S3 bucket because just now I have modified header (added some words) and uploaded new index.html file but the website is not showing any changes. And there is no other index.html file in hosted bucket. I don't understand how does it works. – yesitsmewojtek Nov 06 '21 at 12:45
  • You are caching items somewhere, most likely at the CDN level - have you cleared your CDN cache? This is a caching problem. – Ermiya Eskandary Nov 06 '21 at 12:47
  • Well probably I'm using it and that is the issue. Also I have not cleared my CDN cache. I will look how to fix this problem and write here what I have learned. – yesitsmewojtek Nov 06 '21 at 12:50
  • If you're using Cloudflare it will most likely have acching at some level - disable it/clear it – Ermiya Eskandary Nov 06 '21 at 12:55
  • 1
    I voted to close this question because it is not a programming question and it is off-topic on Stack Overflow. Non-programming questions about your website should be asked on [webmasters.se]. Please delete your question here and re-ask it there. – Stephen Ostermiller Nov 06 '21 at 20:27

1 Answers1

0

Ok, so obviously the old version of index.html was still in CDN cache. I had to invalidate all files in the CloudFront distribution. I have found all helpful information on this site.