Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2015-05-29 12:01:06

johnshorephoto
Member
Registered: 2015-05-27
Posts: 41

Tracking Gallery Images with Google Analytics

I just created and published my first gallery with CE4.  Visits to the gallery page itself are tracked OK in Google Analytics.  I would like also to see how many times each image was viewed, but that doesn't seem to be the case.  I'm guessing (newbie guess) that this is because the individual images are not loaded from image-specific pages (as is the case for some non-CS4 web galleries I've used).  Is that right?   Is there a way to create a gallery and track individual image visits?   Thanks! 
js

Offline

#2 2015-05-29 14:02:55

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Tracking Gallery Images with Google Analytics

Matt will have to answer definitively, but try the HTML: Single-image option under Appearance > Large Image Presentation


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#3 2015-05-29 16:22:15

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Tracking Gallery Images with Google Analytics

What he said.


Matt

The Turning Gate, http://theturninggate.net

Offline

#4 2015-06-01 06:27:48

johnshorephoto
Member
Registered: 2015-05-27
Posts: 41

Re: Tracking Gallery Images with Google Analytics

Hi Rod and Matt - Thank you both for your prompt responses.  When I posted, I was very low on the leaning curve, so before replying I wanted to get higher so I understood CE4 better and could do some experiments.  Having made a lot of progress, I first want to say "hats off!" to Matt and all involved.  I'm super impressed.  I got CS4, not to build a fairly-static portfolio site. but to replace a cumbersome system I had for frequently creating and posting shoot albums.  CS4 is going to save me a huge amount of time, while also presenting albums in a much more useful (and prettier) way.  Thank you. 

OK, now for single-image HTML and Google Analytics (GA).  So far, I haven't been able to make it work.  I've set up a rudimentary site at http://www.jshorephoto.com/ with two test albums.  One was created with desktop/mobile as highslide/touch, and the other with single-HTML for both desktop and mobile.  The albums themselves work well and present well (as does search, which is fabulous), but GA still doesn't report individual image visits.  I do have an important clue, namely that permalinks aren't working. 

The first thing I noticed is that both albums appear the same visually and work the same on both desktop and mobile.  This surprised me, as I had assumed that on the desktop the highslide and single-html albums would present and work differently.  Likewise, I had assumed that on mobile, the touch and single-html would present and work differently.  But I don't see any differences (e.g., I can swipe and pinch the mobile single-html album).  Is that a misunderstanding on my part, or a clue?   I did double check that the template used for the html-html album indeed has single-html selected for both desktop and mobile. 

As I mentioned, the main clue is that permalinks don't work.  When I click on a permalink icon, I get the error "The requested URL /j/s/jshorephoto.com/public/galleries/soja-test-html-html/single.php was not found on this server."   The file single.php is on my site at public/galleries/soja-test-html-html/single.php".   I have no idea where the "/j/s/" comes from, and if it's a coincidence that my initials are js. 

A related clue has to do with setting up phplugins.  When I ping  www.jshorephoto.com/phplugins/path.php, it returns "/services/webpages/j/s/jshorephoto.com/public/phplugins" - there's the "j/s/" again. 

The site is hosted by www.aplus.net

I hope you can help me solve this.  The permalinks are crucial because my users and I both need to be able to point to specific images.   And it's likewise important that I can track image popularity via GA. 

Thanks again for the great tools, and for being available to help troubleshoot.

js

Offline

#5 2015-06-01 06:44:52

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Tracking Gallery Images with Google Analytics

sure looks like the server path is sneaking into the permalink url.

Ben or Matt will have to look into the permalink issue. I seem to remember something about that coming up in the forum awhile back but couldn't find it with a search.

The first thing I noticed is that both albums appear the same visually and work the same on both desktop and mobile.

that's because they're both using the same template: "js gallery highslide-touch". And it's using Highslide for the desktop presentation.
So just create another template using the single page html presentation for desktop and use that on the second album.

also, you should only use letters, numbers, dashes, and underscores in web file and folder names. No spaces or special characters. The template you're using for those albums has spaces in it and I recommend that you replace those spaces with dashes or underscores.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#6 2015-06-01 09:50:47

johnshorephoto
Member
Registered: 2015-05-27
Posts: 41

Re: Tracking Gallery Images with Google Analytics

Ha (and ouch!) - you're right, of course.  I was careful to prepare the two templates, but sloppy when I created the albums.  Thanks. 

But, now, after publishing (correctly) the html-html album (template: js gallery html-html), attempts to view individual images on both desktop and mobile yield the same error as the permalink error:  "The requested URL /j/s/jshorephoto.com/public/galleries/soja-test-html-html/single.php was not found on this server".   So it appears that whatever is ailing the permalink also causes single-html to fail (which I guess isn't surprising). 

js

Offline

#7 2015-06-01 10:15:48

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Tracking Gallery Images with Google Analytics

well, that error has popped up before:

http://community.theturninggate.net/top … -phpfiles/

it's probably the mod rewrite issue. See if the suggestions that Ben provides help.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#8 2015-06-01 17:31:04

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Tracking Gallery Images with Google Analytics

The permalinks should just use the single-image HTML pages. So as Rod suggests, it's probably something amiss with your mod rewrite stuff / server configuration. Try the solution in the other thread and let us know how that goes for you.


Matt

The Turning Gate, http://theturninggate.net

Offline

#9 2015-06-01 22:17:43

johnshorephoto
Member
Registered: 2015-05-27
Posts: 41

Re: Tracking Gallery Images with Google Analytics

Thank you Rod and Matt.   

I've submitted a ticket to my provider asking them to enable mod_rewrite.  Meanwhile, I'm puzzled about something that's either a clue or just is an example of my not understanding how CS4 works.   When I click on a thumbnail in the gallery http://www.jshorephoto.com/galleries/so … html-html/ , the resulting URL in the browser address bar is (for example) "http://www.jshorephoto.com/galleries/so … single.php", and the browser reports the error I mentioned: "The requested URL /j/s/jshorephoto.com/public/galleries/soja-test-html-html/single.php was not found on this server".

When I look directly (via FTP) at the directory  jshorephoto.com/public/galleries/soja-test-html-html, I do see single.php, but I don't see a file 20131229_js_1352-d-s1-single.php (which is in the URL in the browser address bar).  Is that to be expected?   I had assumed that I could find somewhere a static html page for 20131229_js_1352-d-s1. 

js

Offline

#10 2015-06-01 22:51:06

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Tracking Gallery Images with Google Analytics

that's to be expected. The -single.php pages are dynamically created (or words to that effect).


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#11 2015-06-02 03:51:45

johnshorephoto
Member
Registered: 2015-05-27
Posts: 41

Re: Tracking Gallery Images with Google Analytics

Thanks Rod.

Offline

#12 2015-06-03 00:27:08

johnshorephoto
Member
Registered: 2015-05-27
Posts: 41

Re: Tracking Gallery Images with Google Analytics

The provider (www.aplus.net) advises me that mod_rewrite is enabled, and they therefore believe there's a coding issue.  Here's the meat of what they sent:

Please be informed that mod_rewrite is enabled on our servers, see the attached screenshot. Since this is a commercial code, it may vary depending on the configuration of the hosting. If it requires certain services (like mod-rewrite), then it may work on your domain with minimal to no changes on its coding. We advise you to check the .htaccess directives on your webspace as it might also affect the whole functionality of your site.

 

They installed a little test script at http://www.jshorephoto.com/mod_rewrite_test/ (which you can run) - it reports "mod_rewrite works!".   

i would appreciate any additional help.  Thanks.  js

Offline

#13 2015-06-03 00:36:51

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Tracking Gallery Images with Google Analytics

be sure to check your .htaccess file as well

http://community.theturninggate.net/post/22805/#p22805

if that doesn't help, you might want to shoot Ben an email or PM (links are below his picture in the referenced thread). He may need ftp access as well.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#14 2015-06-03 01:27:14

johnshorephoto
Member
Registered: 2015-05-27
Posts: 41

Re: Tracking Gallery Images with Google Analytics

That fixed it - after I went through all of the .htaccess edits to test mod_rewrite, I edited ttg-be/publisher/application/skeleton/gallery/htaccess as described and did the "Update Album Files".   

I greatly appreciate the help in getting this fixed, but I have to say it's disconcerting that this fix from 9 months ago was not in the CE4 release that I just purchased; I wasted a lot of time chasing this. 

Anyway, thanks again.  I'm noticing some other oddities with single-html albums, but I doubt they're related so I'll see if I can figure them out myself.   

js

Offline

#15 2015-06-03 01:46:20

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Tracking Gallery Images with Google Analytics

I don't really know if that fix works in every case (or perhaps it messes up most standard set ups, I just don't know - note Ben's "pending further testing" disclaimer) so that may be why it's not been included yet.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#16 2015-06-03 02:17:06

johnshorephoto
Member
Registered: 2015-05-27
Posts: 41

Re: Tracking Gallery Images with Google Analytics

OK; thanks again.

Offline

#17 2015-06-03 02:22:44

johnshorephoto
Member
Registered: 2015-05-27
Posts: 41

Re: Tracking Gallery Images with Google Analytics

Oh, and to come full circle, GA does now report individual image visits.

Offline

Board footer

Powered by FluxBB