How Do I Add Google Analytics Code in...

User 629005 Photo


Ambassador
2,174 posts

Tanya Solomon wrote:
I used CC's html editor and saved my page with the code in it. So hopefully that will stick when I re-open VSD.


Unfortunately, NO it will not... VSD opens a special file (not the .html files that it creates) when you open the program. It then saves to that file, and creates the .html files to upload. So your movement of the code, will have to be re-done if you make changes via VSD from this point forward.

And just to cover all bases, PLEASE be sure to submit a trouble ticket on this... CC is VERY good about fixing what they can, but sometimes it has to be pointed out to them. And although SOME of the staff does get on here from time to time, the forum is meant more for user to user... A trouble ticket gets dropped right in their lap.
Living the dream, stocking the cream :D
User 2114410 Photo


Registered User
383 posts

Edit: You guys posted too fast for my reply. :D

You are right Jo Ann, you don't need to do both - replying to your post a few up now. :)

They give you an option to do either. And they are both still current - you can do either. I have both webmaster tools, and google analytics. Also yahoo too. In SCC, you have to put it in the footer, and although it's in the body, it still works. Sometimes I do need to verify with yahoo again, but that could be a yahoo thing. :D

It does take a while to get your stats, but it should let you verify the code immediately, so something isn't right there. Google does have issues though, as it wouldn't let me verify for a while (even though I'd already verified it previously & not changed a thing), and even opened a support ticket. Scott couldn't find anything wrong, and neither could I. I found other people in a search (not CC users) had similar problems, and it said to wait a few weeks, try again, so I did, and then it just verified again. Who knows why. Google is google. :rolleyes:

I did mine through webmaster tools though, so maybe that is another option - plus webmaster tools is really good to have also. :)

If you want stats on all your pages, yes I think you do need the code on all of them.
User 495092 Photo


Registered User
259 posts

Well that's just silly that one CC program (html editor) won't connect with another CC program (VSD). No way to import it? That's plain stupid. PLEASE FIX THE CODE LINK, CC! That way I can just install it via VSD. I tried. Really I did!

Is there a way to view the code on VSD?

So you're telling me that just because I saved the html page in its original folder via html editor.....when I go to open that SAME page in VSD, it will delete the code that I added? The page is saved WITH the code. How does opening a page delete it?
User 38401 Photo


Senior Advisor
10,951 posts

Hiya Tanya,

Try to realize that these are entirely separate entities when it comes to Visual Editing and Code Editing for any program/site setup. Yes there are a few programs out there that you can do both in, but you pay exhorbitant prices to do so too. The code styles for Visual Site Designer and the HTML Editor (any html eiditor for that matter) are totally different. Having said this, the main reason you cannot do what you did and then expect to have it there when you open it in VSD is that VSD does NOT have any import capabilities. I don't believe there will be any in the future, but I could be wrong. Since it cannot import, that means it cannot see that you made any changes.

That doesn't make it stupid, nor needing a fix, it's working exactly as intended. Visual Site Designer saves all the files into a single file and when you open it again, you are opening "that exact" file so it doesn't see the actual HTML files you have outside of it. Therefore it doesn't see the HTML page that you have edited since it's not inside the program.

I hope that makes sense, and I'm sorry that upsets you, but that is how it has always worked.

Please do what Phil suggests and open a ticket with CC to see if they can help you get the code to the right location and such. I'm sure they will be very glad to help with that.
User 2114410 Photo


Registered User
383 posts

Can you add the html code manually in VSD - not by using the 'insert google' code? I know you could add html into the body. Not sure about head. But if it works in the footer for SCC Pro, would it also work in the footer of VSD?
User 495092 Photo


Registered User
259 posts

Ok, I will open a ticket. But I'm still confused. Doesn't VSD open my site from the site folder? The same folder where it saves all my html pages, etc?? Doesn't it load from those pages? And if it does, and one of the pages has been changed and saved.....doesn't it open that exact page with the changes? Are you saying the the HTML editor saves my pages to another location? So each program is using different files?

I'm only upset because the way VSD has me input the code is incorrect. That's all. And I had to go do it myself.

PS-I don't use VSD to upload my files if that makes any difference.

T.
User 495092 Photo


Registered User
259 posts

Bren, when I try to copy and paste any code in either the html or code section, it deletes spaces, etc, which is why it doesn't work. Otherwise, I'd add it to the "header" because that's where Google says I should add it.
User 2114410 Photo


Registered User
383 posts

Okay Tanya, sounds like Phil is right on with the support ticket. :D

I don't use VSD atm, so I haven't tried adding the code, but played around for a months trial so only remember what I did while I had that. :)
User 629005 Photo


Ambassador
2,174 posts

Tanya Solomon wrote:
PS-I don't use VSD to upload my files if that makes any difference.

Nope, it's not how you upload. VSD creates and works from a "master file" if you will, and all of your pages are saved there for working. When you "publish" your site, VSD creates the html files for each page based on what is in the "master file". It saves them locally in the site folder, and if you chose to upload via VSD it send them (along with the "master file" for backup) to your server. Making changes to the individual html files does not change the info in the "master file" and thus VSD can not see those changes. I agree with Jo Ann, I don't anticipate that VSD will ever be able to import html files.

Tanya Solomon wrote:
Bren, when I try to copy and paste any code in either the html or code section, it deletes spaces, etc, which is why it doesn't work. Otherwise, I'd add it to the "header" because that's where Google says I should add it.


I'm not sure where you have read that Google wants it in the <head> section, as everything that I've read as of late, says to put it in the <body> (specifically right before the </body> line). I do agree that it seems that VSD has a feature that is not working properly, and although you have a work around option (which you've successfully implemented) I still URGE you to create that trouble ticket. It WILL get in the right hands, and not only will you be helping yourself to reduce stress levels in the future, you will be helping others as well :D
Living the dream, stocking the cream :D
User 495092 Photo


Registered User
259 posts

I did open a support ticket. So far they see nothing wrong on their end. So I'm not sure why mine isn't working. Here is the quote from Google's site just above the code it gives me:

"Copy the following code, then paste it onto every page you want to track immediately before the closing </head> tag"

Support seems to think it doesn't really matter at all where you put the code. So why does Google tell me exactly where to put it?

Ok I'm frustrated now. It's finally working but maybe I should go back and try the other way again......it didn't work before but maybe it was just a fluke.

T.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.