Problem connecting with Google tag manager
Forum rules
IMPORTANT NOTE!!
DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.
PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
IMPORTANT NOTE!!
DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.
PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Problem connecting with Google tag manager
Hi.
I am trying to connect a Gooogle ad campaign to my website and have used the Google tag manager to generate the TAG code to be inserted in the page <head> and <body> sections as follows
HEAD
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var =d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js ... efore(j,f);})(window,document,'script','dataLayer','GTM-PD5KD8NL');</script>
<!-- End Google Tag Manager -->
BODY
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.htm ... "height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
Google TAG manager however gives the following error message;
A timeout occurred while attempting to connect to https://www.gubbhost.se/
I have loaded this website into my browser and used the inspector to see if the code is there .. you can check this for yourself.
My consultant at Google suggests the problem is caused by the Google Tag not being high enough in the <head> section.
Can you confirm that this is the cause of the problem or if not then perhaps suggest what could be causing the issue.
Many thanks
I am trying to connect a Gooogle ad campaign to my website and have used the Google tag manager to generate the TAG code to be inserted in the page <head> and <body> sections as follows
HEAD
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var =d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js ... efore(j,f);})(window,document,'script','dataLayer','GTM-PD5KD8NL');</script>
<!-- End Google Tag Manager -->
BODY
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.htm ... "height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
Google TAG manager however gives the following error message;
A timeout occurred while attempting to connect to https://www.gubbhost.se/
I have loaded this website into my browser and used the inspector to see if the code is there .. you can check this for yourself.
My consultant at Google suggests the problem is caused by the Google Tag not being high enough in the <head> section.
Can you confirm that this is the cause of the problem or if not then perhaps suggest what could be causing the issue.
Many thanks
Re: Problem connecting with Google tag manager
You have placed the code in the wrong section of the page.
The code is inside the body tag, this is incorrect. This section may only have HTML attributes.
The code is inside the body tag, this is incorrect. This section may only have HTML attributes.
Re: Problem connecting with Google tag manager
no I don't think so. Can I upload a screenshot to this forum?
- BaconFries
-
- Posts: 5619
- Joined: Thu Aug 16, 2007 7:32 pm
Re: Problem connecting with Google tag manager
No not directly as uploading image to the forum is disabled. As an alternative you can use the following.https://imgbb.com/
or you can upload to your own host/server and provide a url to it.
or you can upload to your own host/server and provide a url to it.
Re: Problem connecting with Google tag manager
I have removed the code from the <body> section and uploaded the page and verified that it has been updated but the problem remains. The google code is in the <head> section of the page but the tag manager can not connect
I surely am not the first person to attempt this using a page created with WYSWYG ?
I surely am not the first person to attempt this using a page created with WYSWYG ?
- BaconFries
-
- Posts: 5619
- Joined: Thu Aug 16, 2007 7:32 pm
Re: Problem connecting with Google tag manager
As Pablos reply you have placed the code inside the body tagno I don't think so. Can I upload a screenshot to this forum?
Code: Select all
<body
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.htm ... "height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) ->>
Re: Problem connecting with Google tag manager
If you want to place the code at the top of head tag then you will need to place in 'user defined' section of the meta tags.
Re: Problem connecting with Google tag manager
ok done that and now Google tag manager can connect but gives the following error message
https://ibb.co/YQ17gd0
also curious as to why the code is still in the <head> section when it has been removed ? (bug??)
https://ibb.co/NZcryH0
https://ibb.co/YQ17gd0
also curious as to why the code is still in the <head> section when it has been removed ? (bug??)
https://ibb.co/NZcryH0
Re: Problem connecting with Google tag manager
also it seems that there is an error in the Google Tag code... could this be the problem?
https://ibb.co/d7Zzskn
https://ibb.co/d7Zzskn
Re: Problem connecting with Google tag manager
One problem i see from your screenshot it that you have the <script> tag before the Doctype!
This is incorrrect. Remove this.
the script tag should be placed in the <head> section as close as possible to the opening <head> tag if possible. The <no script> tag should be placed immediatley after the <body> tag (this can be chosen as one of the options in the html box).
I don't think you should have an issue if the <script> tag is not the first thing in the head but test and see. Publish the page to your disk and then open the html page in notepad and move the <script> tag up right after the head tag and upload it to your server and see if it makes a difference.
This is incorrrect. Remove this.
the script tag should be placed in the <head> section as close as possible to the opening <head> tag if possible. The <no script> tag should be placed immediatley after the <body> tag (this can be chosen as one of the options in the html box).
I don't think you should have an issue if the <script> tag is not the first thing in the head but test and see. Publish the page to your disk and then open the html page in notepad and move the <script> tag up right after the head tag and upload it to your server and see if it makes a difference.
Re: Problem connecting with Google tag manager
""(this can be chosen as one of the options in the html box).""
where can I find 'the option box' in the HTML box?
where can I find 'the option box' in the HTML box?
Re: Problem connecting with Google tag manager
In the "Type" drop down box.
Re: Problem connecting with Google tag manager
problem solved. The Google tag must be directly after the <head> tag thus...
<!doctype html>
<html lang="sv">
<head>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js ... efore(j,f);})(window,document,'script','dataLayer','GTM-PD5KD8NL');</script>
<!-- End Google Tag Manager -->
<meta charset="utf-8">
<title>Gubbhöst teater i eskilstuna teater i sörmland riksteatern sörmland</title>
-------------------------
now Google tag manager can connect. If this is correct then pls (Pablo) update the online help. If this is incorrect pls suggest the correct and tested way of doing this
<!doctype html>
<html lang="sv">
<head>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js ... efore(j,f);})(window,document,'script','dataLayer','GTM-PD5KD8NL');</script>
<!-- End Google Tag Manager -->
<meta charset="utf-8">
<title>Gubbhöst teater i eskilstuna teater i sörmland riksteatern sörmland</title>
-------------------------
now Google tag manager can connect. If this is correct then pls (Pablo) update the online help. If this is incorrect pls suggest the correct and tested way of doing this