Topic: Google Analytics and SimpleViewer

Hi there,

I have been using the Lightroom Export function to export as a SimpleViewer gallery for awhile, and have added my own Google Analytics account information to the template.

But, is it possible in SimpleViewer-Pro to include Analytics to each image viewed?

Best regards,
Michael Nielsen, photographer
http://www.photofolio.dk/ - http://www.photofolio.dk/blog/

Last edited by Ruprect (2010-02-15 10:06:52)

Re: Google Analytics and SimpleViewer

is it possible in SimpleViewer-Pro to include Analytics to each image viewed?

Yes. You can use the JavaScript API to fire a Google Analytics tracking call every time an image is viewed. Use the 'svImageChange' event.

Felix Turner
SimpleViewer Support Team.

Re: Google Analytics and SimpleViewer

Argh, you've just cost me 45$, damn you smile

Best regards,
Michael Nielsen, photographer
http://www.photofolio.dk/ - http://www.photofolio.dk/blog/

Re: Google Analytics and SimpleViewer

Hello,

Is it possible to give me detailed info (step by step) on how to track individual images on google analytics?  I do not necessarily understand how to enable the svchangeimage...and where do I embed the google analytics code?  Do I need to use the new api code from google analytics as well to make this work?

I am embedding the simpleviewer pro by javascript into my webpage

I need to have many galleries.

Thank you for any help you can give.

As you can tell, I am very new at this, but in time can learn...

Sincerely,

Ron

Re: Google Analytics and SimpleViewer

I would be interested in this as well.

Thanks.

Re: Google Analytics and SimpleViewer

I don't know much about Google Analytics as I don't use it, but it looks like it would be relativity easy. Take a look at the JavaScript API Example found in the example folder of the pro download.

            //Called by SWF when user views an image
            //This is a good place to add per-image tracking calls 
            //or other per-image actions like switching out a banner ad
            function svImageChange(index){
                //alert("Image Viewed: " + index);
                displayOutput("Got Image Change Event: " + index);
                var imageInfo = svAPI.getImageInfo(svAPI.getImageIndex());
                displayOutput("imageURL: "  + imageInfo.imageURL +
            }

On the Google side you could use _trackEvent() to pass info about the image views.

_trackEvent(category, action, optional_label, optional_value)

http://code.google.com/apis/analytics/d … Guide.html

Mike Richards
SimpleViewer Support Team.

Re: Google Analytics and SimpleViewer

Hello again,  I am still a very new beginner and need assistance in this javascript api and tracking it with google analytics.  I have placed my tracking code in the javascript api and place the javascript api in the same folder as my gallery..

What else do I need to do to make it work.  No google analytics code is showing up on those pages.

I must be missing something real simple, just cannot figure it out.

Thank you in advance.  any step by step instructions would be very much appreciated. 

Info for me to "use the javascript api" is not enough for me to go on.  what exactly do I need to do to use the javascript api?

Thanks...ron

Re: Google Analytics and SimpleViewer

Hi,

we've added some example code showing how to integrate SimpleViewer-Pro with Google Analytics here: http://www.simpleviewer.net/simpleviewe … l#tracking

Felix Turner
SimpleViewer Support Team.

Re: Google Analytics and SimpleViewer

Hi Felix,

Thank you for the reply.  I did what you said to do and I have not found any tracking of the info in google analytics.  i placed the file in the same directory as the gallery is in and changed the tracking code number for ga account. 

How does google get the info from ga-tracking.html?  What in  my website will point to the ga-tracking.html for it to track it?  Do I need to set up event tracking in google analytics as well?  I have it set but have not put additional code to track it.  it remains showing zero for event tracking. 

Thank you for your assistance.

Ron

Re: Google Analytics and SimpleViewer

The javascript tracking code needs to go in the HTML file that is embedding your gallery. 'ga-tracking.html' is an example showing how to do this.

Felix Turner
SimpleViewer Support Team.

Re: Google Analytics and SimpleViewer

Hello again,

Thank you so much for the help already given.  I tried everything to make it work and then decided to rest on it.  I found out that it is working but shows me the event tracking in a different account...in my same account area, if that makes sense.

One more questions...right now the event tracker shows me the image by the image number starting at image number 0.  Can I ask it to give it to me by the file name of the image instead?  i have so many galleries and images that it would be overbearingly  difficult with just the image number.  I sure hope their is a way.

Felix, thank you for going through the effort to simplify this down for me.

Ron smile