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.
Post Reply
User avatar
Pablo
 
Posts: 21579
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Best way to use Google Analytics in WB?

Post by Pablo »

The code is on the page, so it should be ok.
ae_registration
 
 
Posts: 8
Joined: Wed Feb 01, 2017 8:24 am

Re: Best way to use Google Analytics in WB?

Post by ae_registration »

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: 21579
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Best way to use Google Analytics in WB?

Post by Pablo »

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: 35
Joined: Thu Apr 12, 2012 11:18 am

Re: Best way to use Google Analytics in WB?

Post by petertj »

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: 5328
Joined: Thu Aug 16, 2007 7:32 pm

Re: Best way to use Google Analytics in WB?

Post by BaconFries »

Seems to be there when I view the source.
Image
petertj
 
 
Posts: 35
Joined: Thu Apr 12, 2012 11:18 am

Re: Best way to use Google Analytics in WB?

Post by petertj »

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: 5328
Joined: Thu Aug 16, 2007 7:32 pm

Re: Best way to use Google Analytics in WB?

Post by BaconFries »

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: 35
Joined: Thu Apr 12, 2012 11:18 am

Re: Best way to use Google Analytics in WB?

Post by petertj »

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