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
etcbbu
 
 
Posts: 324
Joined: Mon Apr 23, 2007 3:00 pm

Best way to use Google Analytics in WB?

Post by etcbbu » Wed Apr 18, 2018 6:59 am

(the last few posts on this page will give you the best insight into what we were talking about in another topic on the wrong board : viewtopic.php?f=59&t=80288 )

But here is what I am trying to figure out right now:

So, what I have done in my .WBS file, in my WB project, just now is gone to the page of my website called

"masterpage1"

This page is set to NOT PUBLISH, but it is a "Master Object" that is called on every page of my website. So I now went to that Page, and, using the top-ribbon, I clicked

"Page" >> "Google Analytics" >>

I cleared out the line that says

"

Code: Select all

<!-- Insert Google Analytics code here -->
"

there, and simply pasted the Google Analytics code for my property, that I get when I log in to Google Analytics and click

"Options" >> "Tracking Info" >> "Tracking Code"

And literally just copy/pasted that entire snippet in place of the
"

Code: Select all

<!-- Insert Google Analytics code here -->
" mentioned above.

I then went to that same "masterpage1" and deleted-out the old way I was doing it, where I was using an HTML object to paste the Google Analytics snippet in an "HTML Object", on the page, in WB.

Then, I published my entire project, meaning, re-published every page of my website that calls the "masterpage1" page *which is set to not-publish* , but which also follows that method that @ColinM told me, which had me put the snippet into the Page >> Google Analytics location.

Am I to expect this is the best way to do this?

Because now, when I am in my .WBS file, and I now go to the individual pages of my website, and I use the top options

Page >> Google Analytics

Certainly, those all still say

"

Code: Select all

<!-- Insert Google Analytics code here -->
"

since I was thinking that @ColinM was saying that I only need to do it in the one spot, in the "masterpage1" Page >> Google Analytics spot?

Under this setting, when I visit my pages right now, I am not seeing myself show up as "Live Traffic", like I was, previously, whenever I was using an HTML Object on every page, to have the Google Analytics code.

Are my two options:

1) either now start publishing "masterpage1" Master Object, since it now has this Google Analytics Code in the Page >> Google Analytics location?

2) keep not-publishing "masterpage1" Master Object, but then go through and Manually paste-in the Google Analytics snippet one-by-one, page-by-page, doing the Page >> Google Analytics option for every page of the website?

Or is there something else I am missing?
www.ktravisj.com

Travis J Consulting, LLC -
Website Design/Development/Maintenance, Web-Marketing/Social Media/Social/Networking, SEO/Search Engine Optimization

www.ktravisj.com

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

Re: Best way to use Google Analytics in WB?

Post by Pablo » Wed Apr 18, 2018 7:54 am

Master objects do not include Page HTML or Page Properties, only the object will be included.
If you want to add HTML code to a master page then you will need to use the HTML object.

User avatar
etcbbu
 
 
Posts: 324
Joined: Mon Apr 23, 2007 3:00 pm

Re: Best way to use Google Analytics in WB?

Post by etcbbu » Wed Apr 18, 2018 7:02 pm

ColinM was telling me, here:

http://wysiwygwebbuilder.com/forum/view ... 59&t=80288

That it's best to put the Google Analytics code snippet in "Head" of the masterpage that undergirds all pages of the website, and then publish the masterpage.

Whereas, I was more saying that I've never published my Master Objects in any of my projects that serve as my masterpages that comprise my headers and footers and stuff like that, which are called on every page of my website projects, because I'd rather not publish extra php or .html pages on my web-space for SEO purposes. So I'm going to use this method of pasting the Google analytics code, page-by-page, on every project, in that "Head" area, one-by-one. Does this sound like an acceptable way to use Google Analytics in my WB projects? I would just like to know, for sure, moving forward, because I will probably roll this out to multiple projects, if so.
www.ktravisj.com

Travis J Consulting, LLC -
Website Design/Development/Maintenance, Web-Marketing/Social Media/Social/Networking, SEO/Search Engine Optimization

www.ktravisj.com

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

Re: Best way to use Google Analytics in WB?

Post by Pablo » Wed Apr 18, 2018 7:36 pm

- you do not need to publish the master page.
- if you want to add the code to a master page then it should be in an HTML object, set to 'between head tags'

User avatar
etcbbu
 
 
Posts: 324
Joined: Mon Apr 23, 2007 3:00 pm

Re: Best way to use Google Analytics in WB?

Post by etcbbu » Wed Apr 18, 2018 7:44 pm

Ok, I see what you are saying there; so I can either

- go page-by-page and use the Page >> Google Analytics and paste the code snippet there

- continue to use the HTML object on a masterpage, but just make sure I edit the Properties of the HTML Object, and edit the Type to be set to "Between <head></head> tags"

And those are kind of the two different ways it can be done in WB?
www.ktravisj.com

Travis J Consulting, LLC -
Website Design/Development/Maintenance, Web-Marketing/Social Media/Social/Networking, SEO/Search Engine Optimization

www.ktravisj.com

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

Re: Best way to use Google Analytics in WB?

Post by Pablo » Wed Apr 18, 2018 8:18 pm

Correct

User avatar
ColinM
 
 
Posts: 916
Joined: Wed Feb 09, 2011 3:40 am
Location: Western Australia
Contact:

Re: Best way to use Google Analytics in WB?

Post by ColinM » Thu Apr 19, 2018 7:51 am

Pablo wrote:
Wed Apr 18, 2018 7:36 pm
- you do not need to publish the master page.
- if you want to add the code to a master page then it should be in an HTML object, set to 'between head tags'
Thank you Pablo for the correction - apologies etchbu 8)
Yours truly
Colin M
Western Australia
FORUM MODERATOR
Please think before you post, be polite, don't hijack threads and above all please respect Pablo's huge effort!
My Website

User avatar
tommy888
 
 
Posts: 438
Joined: Mon Sep 28, 2009 5:41 pm
Location: Poland
Contact:

Re: Best way to use Google Analytics in WB?

Post by tommy888 » Thu Apr 19, 2018 9:22 am

There's no need to add Google tracking code to master pages as well as publishing them as Pablo said.
Add the code to each page you want to have tracked by Google Analytics bots in <head></head> section. To make them indexable use robots.txt file or WB12 page settings. Robots.txt is preferred by Google.

User avatar
protectourlands
 
 
Posts: 720
Joined: Sat May 24, 2008 2:16 am
Contact:

Re: Best way to use Google Analytics in WB?

Post by protectourlands » Fri Apr 20, 2018 1:58 pm

You can also use the built in Google Analytics tool under the Page tab.

I prefer to use the Site HTML tool also under the Page tab. This way yo can apply the snippet to all pages in one step instead of having to insert it page by page.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 2 guests