X

Adding Google Analytics to iWeb using HTML Snippets

Many users publishing their Web sites using Apple's iWeb site publisher have expressed frustration when trying to add the power of Google Analytics to their pages. Google Analytics allows Web page publishers to see how the visitors to their site interact

CNET staff
2 min read
Many users publishing their Web sites using Apple's iWeb site publisher have expressed frustration when trying to add the power of Google Analytics to their pages. Google Analytics allows Web page publishers to see how the visitors to their site interact with the elements on the page. For the purposes of this hint, we are using iWeb '09.

Apple Support Discussions user Grant Symon poses the question:

"I'm trying to add an HTML snippet with my Google Analytics code and the snippet is not being added to the page. Has anyone an idea of what I need to do to make it publish with the code?

Perhaps I need to add some before/after tags?? (I'm a bit lost with HTML, but Apple say in the iWeb '09 Help, that you can add any sort of HTML using the snippets."

Typically Google Analytics codes do not work inside HTML snippets. However, as Grant Symon later figured out, changing the location of the HTML snippet may cause the code to work.

Solution

"HTML snippets do indeed work.

The problem:
When you choose to insert an HTML snippet, iWeb '09 always places it in the body of the page. If you try to move it elsewhere, it won't go. Instead, it simply pushes the boundary between the parts to enlarge the body.

The solution:
You must put the snippet into the page footer. To move the snippet into the footer, you must hold down the Command (Apple) key when moving it. That's all."

Resources
Read this Apple Support Discussions thread about inserting Google Analytics into an iWeb site using HTML snippets.
Read about Google Analytics.

Experiencing problems? Have feedback? Let us know!

Resources

  • Apple Support Discussions ...
  • Read about Google Analytic...
  • Let us know!
  • More from Late-Breakers