you haven't given us enough details to help you.
I am just trying to log the number of visits on my specific layouts.
I have added a custom function which has code to query Google analytics, and a script which refers to that function whenever any user comes on a layout.
I have tried differnt things but not sure what exactly i am missing.
I have also reffered to video on http://www.filemakermagazine.com/ by Matt, but do not have a sample file so not sure where things are wrong.
Is it possible for you to post a sandbox or test file that we can see? I just watched most of that sample video, and think that the issue must lie in one of the following:
1) the way you're generating the links/content for your webviewer
2) the way you're loading the content for your webviewer
3) Incorrect settings between filemaker and google analytics (tracking IDs off).