Adding Google Analytics to your SmugMug Site

AndyAndy Registered Users Posts: 50,016 Major grins
edited February 21, 2013 in SmugMug Support
We've made it really simple now, for any SmugMug customer to add Google Analytics to SmugMug sites.

Google Analytics for All

In the old days, getting Google to track your website’s stats required Advanced Customization and was only available for Power Users and Pros. Those days are over. Check your Control Panel and see a brand new box in your Settings tab. Drop your Google-provided Web Property ID in that box and boom! You’re ready to go.

873913940_YDEuP-588x588.jpg

You’ll still need to open a Google Analytics profile for your site but they’ll provide you with that number, which starts with a “UA” and contains dashes and several digits.

FAQs

"Is there any specific way the Web Property ID needs to be entered?" Yes! Highlight, and copy the Web Property ID exactly from Google - UA-XXXXXX-X and paste it in to the box in Settings Tab, Control Panel.

"Why should I change to this method?" It allows us to optimize the loading of the analytics script to help your pages load faster."

“Great! Can I switch if I have code already installed?” Sure - we'll remind you to remove your old code snipped from your advanced customizing tab.

"If I “switch” over to this analytics, will I lose my history that I currently have in Google Analytics?" No, not at all.

"Is there any advantage of my switching my GA tracking from Advanced Customization to this new 'External Visito Tracking' Setting? If I don't switch, am I losing anything? Yes, the advantage is that we'll take it from here and you don't have to worry about code snippets in your customizing. Just the Web Property ID.

"What happens if I have both codes installed?" Things will still work - but the both are unnecessary so remove the code from your advanced customizing if you're putting the UA code in your Settings Tab.

"I have a custom domain set up with my SmugMug site - should I use that on GA?" Yes - you should only set GA for your custom domain.

"What about Statcounter or other tools?" Sorry, you'll need to continue to use the old method of adding their code snippet to your footer in advanced customizing.
«1

Comments

  • timnosenzotimnosenzo Registered Users Posts: 405 Major grins
    edited May 21, 2010
    Is there any specific way the Web Property ID needs to be entered? Hypens, no hypens, etc? Also, I assume the ID you're looking for is the alphanumeric code shown after my sites name in my GA account dashboard?
  • gfw123gfw123 Registered Users Posts: 41 Big grins
    edited May 21, 2010
    If I already have the footer code for Google Analytics, is there any reason to change? Any more fine grained reporting or something?
  • rsquaredrsquared Registered Users Posts: 306 Major grins
    edited May 21, 2010
    timnosenzo wrote: »
    Is there any specific way the Web Property ID needs to be entered? Hypens, no hypens, etc? Also, I assume the ID you're looking for is the alphanumeric code shown after my sites name in my GA account dashboard?

    From Andy's post "which starts with a “UA” and contains dashes and several digits."

    GA needs the full ID, including dashes.
    gfw123 wrote: »
    If I already have the footer code for Google Analytics, is there any reason to change? Any more fine grained reporting or something?

    I just changed mine over just because the less stuff I have in custom footers, the less chance I'll accidentally change it when I do some more customizing....
    Rob Rogers -- R Squared Photography (Nikon D90)
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited May 21, 2010
    timnosenzo wrote: »
    Is there any specific way the Web Property ID needs to be entered? Hypens, no hypens, etc? Also, I assume the ID you're looking for is the alphanumeric code shown after my sites name in my GA account dashboard?

    Yes! Highlight, and copy the Web Property ID exactly from Google - UA-XXXXXX-X and paste it in to the box in Settings Tab, Control Panel.
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited May 21, 2010
    gfw123 wrote: »
    If I already have the footer code for Google Analytics, is there any reason to change? Any more fine grained reporting or something?
    Yes. Let us handle it from here thumb.gif
  • jachangjachang Registered Users Posts: 183 Major grins
    edited May 21, 2010
    I had added something to my code so that it won't count my own visits to my website, but I'll be darned if I can remember where I got the code for it. In order for GA not to count our own visits, won't we still need to add some code?

    Jean
  • surfmonkey89surfmonkey89 Registered Users Posts: 22 Big grins
    edited May 22, 2010
    Does this take a while to propagate? I added this a couple of hours ago, but according to the GA site "tracking is not installed".

    http://photos.lukinich.org
    Paul
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited May 22, 2010
    Does this take a while to propagate? I added this a couple of hours ago, but according to the GA site "tracking is not installed".

    http://photos.lukinich.org

    Yes, it can take up to a day or so. Check tomorrow.
  • surfmonkey89surfmonkey89 Registered Users Posts: 22 Big grins
    edited May 22, 2010
    Andy wrote: »
    Yes, it can take up to a day or so. Check tomorrow.

    Perfect, thanks!
    Paul
  • AllenAllen Registered Users Posts: 10,007 Major grins
    edited May 22, 2010
    jachang wrote: »
    I had added something to my code so that it won't count my own visits to my website, but I'll be darned if I can remember where I got the code for it. In order for GA not to count our own visits, won't we still need to add some code?

    Jean
    It doesn't go in the code. It's a setting on the Goggle site.
    Under Website Profiles > Edit > Filters Applied to Profile
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • jachangjachang Registered Users Posts: 183 Major grins
    edited May 22, 2010
    Allen wrote: »
    It doesn't go in the code. It's a setting on the Goggle site.
    Under Website Profiles > Edit > Filters Applied to Profile

    Oh, I'll check there, then. Then what is this code at the bottom of the GA code for? I'm not sure if I added it or if it was part of their code. Where "loggedIn" was part of the code, I thought it had something to do with it.

    </script>
    <script type="text/javascript">
    try {
    if (!YD.hasClass(document.body, "loggedIn"))
    {

    var pageTracker = _gat._getTracker("UA-15633934-1");
    pageTracker._trackPageview();}
    } catch(err) {}</script>

    I'm going to have to keep better notes on what codes I add. :giggle
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited May 22, 2010
    jachang wrote: »
    Oh, I'll check there, then. Then what is this code at the bottom of the GA code for? I'm not sure if I added it or if it was part of their code. Where "loggedIn" was part of the code, I thought it had something to do with it.

    </script>
    <script type="text/javascript">
    try {
    if (!YD.hasClass(document.body, "loggedIn"))
    {

    var pageTracker = _gat._getTracker("UA-15633934-1");
    pageTracker._trackPageview();}
    } catch(err) {}</script>

    I'm going to have to keep better notes on what codes I add. :giggle
    Just remove the GA code snippet from your customizing and put the UA-XXXXXX-X Web property ID into your settings tab, control panel. Boom-done voila.
  • ghealyghealy Registered Users Posts: 247 Major grins
    edited May 23, 2010
    Okay, I'm not the brightest bulb in the pack some days.

    Is there any advantage of my switching my GA tracking from Advanced Customization to this new 'External Visito Tracking' Setting? If I don't switch, am I losing anything?

    TIA for any comments.
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited May 23, 2010
    ghealy wrote: »
    Okay, I'm not the brightest bulb in the pack some days.

    Is there any advantage of my switching my GA tracking from Advanced Customization to this new 'External Visito Tracking' Setting? If I don't switch, am I losing anything?

    TIA for any comments.

    Yes, the advantage is that we'll take it from here and you don't have to worry about code snippets in your customizing. Just the Web Property ID in your Settings Tab of CP.
  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited May 23, 2010
    ghealy wrote: »
    Okay, I'm not the brightest bulb in the pack some days.

    Is there any advantage of my switching my GA tracking from Advanced Customization to this new 'External Visito Tracking' Setting? If I don't switch, am I losing anything?

    TIA for any comments.
    it allows us to optimize the loading of the analytics script to help your pages load faster.
    Pedal faster
  • Lisa91Lisa91 Registered Users Posts: 56 Big grins
    edited May 23, 2010
    exculding my visit in the count
    I went to this edit and now I'm not sure what to do next. Do I exculde my ip address or what? Please help me. TIA Lisa

    It doesn't go in the code. It's a setting on the Goggle site.
    Under Website Profiles > Edit > Filters Applied to Profile
    __________________
    Lisa

    http://futurestars.smugmug.com/

    "Some people think football is a matter of life and death. I assure you, it's much more serious than that."
    ~~ Bill Shankly
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited May 23, 2010
    Lisa91 wrote: »
    I went to this edit and now I'm not sure what to do next. Do I exculde my ip address or what? Please help me. TIA Lisa

    It doesn't go in the code. It's a setting on the Goggle site.
    Under Website Profiles > Edit > Filters Applied to Profile
    __________________
    Yes, you input your IP Address and exclude that.
  • DiverseImageDiverseImage Registered Users Posts: 17 Big grins
    edited May 24, 2010
    I'm using a separate domain for my hmmmmm "web presence" and was wondering if I have Google analytics set up correctly. I have my site www.diverseimageonline.com linked to my smugmug using only my photography link on that site to navigate to my smugmug. I also currently have that url set up in google analytics. I put the UA number into my smugmug. My question is........when visitors go directly to my smugmug bypassing my domain of diverseimageonline.com will the hits still be registered.
    Do I need to add the code to my footer in my domain?

    Does this have something to do with absolute and relative linking?

    I m pretty lost in the sauce right now. Any help will be greatly appreciated, including tips on incorporating my site, smugmug, blog together or if I currently have it set up okay. My concerns are findability and SEO stuff as well as putting adsence in my domain or blog in the future. I want to maximize all resources. headscratch.gif
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited May 24, 2010
    I'm using a separate domain for my hmmmmm "web presence" and was wondering if I have Google analytics set up correctly. I have my site www.diverseimageonline.com linked to my smugmug using only my photography link on that site to navigate to my smugmug. I also currently have that url set up in google analytics. I put the UA number into my smugmug. My question is........when visitors go directly to my smugmug bypassing my domain of diverseimageonline.com will the hits still be registered.
    Do I need to add the code to my footer in my domain?

    Does this have something to do with absolute and relative linking?

    I m pretty lost in the sauce right now. Any help will be greatly appreciated, including tips on incorporating my site, smugmug, blog together or if I currently have it set up okay. My concerns are findability and SEO stuff as well as putting adsence in my domain or blog in the future. I want to maximize all resources. headscratch.gif

    GA will track whichever domain you are using. Right now, that should be: http://diverseimage.smugmug.com

    Your code is set up in your control panel correctly.

    When / if you change to have http://www.diverseimageonline.com/ land on your SmugMug site, you'll want to change your GA.
  • DiverseImageDiverseImage Registered Users Posts: 17 Big grins
    edited May 24, 2010
    Ok Andy thanks for the help.
  • travischancetravischance Registered Users Posts: 640 Major grins
    edited May 28, 2010
    I followed Andy's recommendation on the OP & GA is showing that I've had some traffic over the past two days. It currently shows 47 visits, 965 page views & 20.53 pages per visit. Granted I'm on the site daily. . . are the statistics skewed because of my page views? About 90% of the time, I'm using the same pc. Thanks.
    Travis M. Chance
    twin Mark IV's & a bunch of "L" glass
    sitefacebook
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited May 28, 2010
    I followed Andy's recommendation on the OP & GA is showing that I've had some traffic over the past two days. It currently shows 47 visits, 965 page views & 20.53 pages per visit. Granted I'm on the site daily. . . are the statistics skewed because of my page views? About 90% of the time, I'm using the same pc. Thanks.
    Go on GA and exclude your own traffic (by your IP Address).
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited May 28, 2010
    Andy wrote: »
    Go on GA and exclude your own traffic (by your IP Address).
    Andy, why don't you guys offer an option to skip GA reporting when we're logged in?

    IP addresses come and go and change when you're on different computers, different WiFi networks, phones, etc... so it's not a very good way to exclude your own traffic. OTOH, I'm nearly always logged into my own site and that works no matter what computer I'm using or what IP address I'm using. Also, it's safe to say that when I'm logged in, I never want my visits logged by GA.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • travischancetravischance Registered Users Posts: 640 Major grins
    edited May 28, 2010
    Thanks Andy & John. How does one exclude their traffic?
    Travis M. Chance
    twin Mark IV's & a bunch of "L" glass
    sitefacebook
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited May 29, 2010
    Thanks Andy & John. How does one exclude their traffic?

    Travis: go to GA and edit your tracking for your site.
  • travischancetravischance Registered Users Posts: 640 Major grins
    edited May 29, 2010
    I spent about an hour trying to figure out how to remove my IP adress from GA tracking. I hope the following helps minimize time spent by future Grinners attempting to complete. . .

    1. on your GA home page, select "FILTER MANAGERS" (bottom right corner)
    2. select "+ ADD FILTER"
    3. enter a "FILTER NAME", select "PREDEFINED FILTER" & "EXCLUDE TRAFFIC FROM THE IP ADDRESS EQUAL TO"
    4. visit http://whatismyipaddress.com/ & your IP address will automatically display
    5. enter your IP address in the "IP ADDRESS" section on GA
    6. select your web address under the "AVAILABLE WEBSITE PROFILES" & select "ADD"
    7. select "SAVE CHANGES"

    For reference, please visit here.
    Travis M. Chance
    twin Mark IV's & a bunch of "L" glass
    sitefacebook
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited May 30, 2010
    I spent about an hour trying to figure out how to remove my IP adress from GA tracking. I hope the following helps minimize time spent by future Grinners attempting to complete. . .

    1. on your GA home page, select "FILTER MANAGERS" (bottom right corner)
    2. select "+ ADD FILTER"
    3. enter a "FILTER NAME", select "PREDEFINED FILTER" & "EXCLUDE TRAFFIC FROM THE IP ADDRESS EQUAL TO"
    4. visit http://whatismyipaddress.com/ & your IP address will automatically display
    5. enter your IP address in the "IP ADDRESS" section on GA
    6. select your web address under the "AVAILABLE WEBSITE PROFILES" & select "ADD"
    7. select "SAVE CHANGES"

    For reference, please visit here.
    Just keep in mind that unless you've paid your ISP extra for a static IP address, your IP address may change from time to time because it is dynamically allocated whenever you reconnect to your ISP. Most software will attempt to keep it the same for awhile, but it is not guaranteed not to change unless you've paid for a static IP address.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • travischancetravischance Registered Users Posts: 640 Major grins
    edited May 30, 2010
    Thanks for the info John (as I look back, you mentioned this in post #24). I've definitely not paid Verizon for a static IP address. With that in mind, it seems that removing your IP address from GA is pointless considering it may change periodically. Maybe the good folks at SM may take your recommendation of building in a "skip feature" while we're logged in.

    Thanks again!
    Travis M. Chance
    twin Mark IV's & a bunch of "L" glass
    sitefacebook
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited May 30, 2010
    Thanks for the info John (as I look back, you mentioned this in post #24). I've definitely not paid Verizon for a static IP address. With that in mind, it seems that removing your IP address from GA is pointless considering it may change periodically. Maybe the good folks at SM may take your recommendation of building in a "skip feature" while we're logged in.

    Thanks again!
    it's not pointless. My ISP hasn't changed my IP in 3+ years.
  • AnthonyPisanoPhotographyAnthonyPisanoPhotography Registered Users Posts: 1 Beginner grinner
    edited June 16, 2010
    Filtering Logged in Traffic
    I believe that having an option to filter your own logged in traffic would be useful.

    I personally make changes or view my site from home, work, cell phone, and other wireless networks. Filtering out my works IP address would not let me see other visitors from work.

    The code that Jachang posted has potential, but I cannot seem to get the variables correct. I am unsure if it is because the changes put in the Control Panel overwrite the custom code, or if the code from Google changed.

    I would vote for a check box in the Control Panel to not include the "SM.tracking..." code when you are logged in.

    Anthony
    www.anthonypisanophotography.com
Sign In or Register to comment.