Best way to use Google Analytics in WB?

This section is for posting questions which are not directly related to WYSIWYG Web Builder.
Examples of off topics: web server configuration, hosting, programming related questions, third party scripts.

Note that these questions will generally not be answered by the administrators of this forum.
User avatar
Pablo
 
Posts: 18420
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Best way to use Google Analytics in WB?

Post by Pablo » Sun Feb 24, 2019 12:41 pm

The code is on the page, so it should be ok.

ae_registration
 
 
Posts: 11
Joined: Wed Feb 01, 2017 8:24 am

Re: Best way to use Google Analytics in WB?

Post by ae_registration » Sun Feb 24, 2019 12:43 pm

Yes, I see it works. I saw you've entered the site. Well, I suppose that the problem was in my browser settings? I use incognito mode and tracking is forbidden. Possible that was the problem?

User avatar
Pablo
 
Posts: 18420
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Best way to use Google Analytics in WB?

Post by Pablo » Sun Feb 24, 2019 1:30 pm

Yes, that may be related.

Note that this is not specific to the application.
The code will be published "AS IS". The behavior of the script is controlled by Google.

petertj
 
 
Posts: 46
Joined: Thu Apr 12, 2012 11:18 am

Re: Best way to use Google Analytics in WB?

Post by petertj » Fri Sep 27, 2019 7:31 am

Hi Pablo,

I've pasted the Analytics code

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

gtag('config', 'UA-XXXXXXXX-1);
</script>
===========================================================

into the "between head tags" but no sign of it turns up in the View Source of the published page.

URL : https://www.learnus.co.uk/index.html

Suggestions are welcome (as always)

Peter

User avatar
BaconFries
 
 
Posts: 4702
Joined: Thu Aug 16, 2007 7:32 pm

Re: Best way to use Google Analytics in WB?

Post by BaconFries » Fri Sep 27, 2019 10:03 am

Seems to be there when I view the source.
Image

petertj
 
 
Posts: 46
Joined: Thu Apr 12, 2012 11:18 am

Re: Best way to use Google Analytics in WB?

Post by petertj » Fri Sep 27, 2019 11:36 am

You are right Baconfries but instead of being where I would expect to have seen code within "the <HEAD> at the upper part of the page it is one of a number <Head>s very near the end.

The primary reason that I wanted to see what what was going on is that Google Analytics is not 'communicating' with this tag avcording to their own test process.

Peter

User avatar
BaconFries
 
 
Posts: 4702
Joined: Thu Aug 16, 2007 7:32 pm

Re: Best way to use Google Analytics in WB?

Post by BaconFries » Fri Sep 27, 2019 11:44 am

Then its possible that you have selected "Move JavaScript to the end of the page". Go to Tools-> Options -> HTML and deselect this and view the source.

petertj
 
 
Posts: 46
Joined: Thu Apr 12, 2012 11:18 am

Re: Best way to use Google Analytics in WB?

Post by petertj » Fri Sep 27, 2019 12:01 pm

The Google code code was taken directly from the Analytics page and inserted using the Page/Google Analytics method.

The Options settings are still on default and I don't recall ever having changing them.

Could it be something to do with the use of Flex Grid?

I don't mind about where WB puts the Analytics stuff, I only want Analytics to recognise its own ID.

Any further help would be appreciated.

Peter

Post Reply