Example code:
<a rel="gallery-508" class="colorbox init-colorbox-processed-processed cboxElement" title="Foo" href="http://example.com/sites/default/files/styles/1024x1024/public/content/foo.jpg"><img width="480" height="320" title="" alt="Foo" src="http://example.com/sites/default/files/styles/large/public/content/foo.jpg" typeof="foaf:Image"></a></div>

Files: 
CommentFileSizeAuthor
#11 googleanalytics-modal-dialogs-scripts-tracking.patch3.73 KBPlazik
PASSED: [[SimpleTest]]: [MySQL] 182 pass(es).
[ View ]
#7 1801020+Track+colorbox+as+pageview-D6.patch1.4 KBhass
PASSED: [[SimpleTest]]: [MySQL] 149 pass(es).
[ View ]
#4 1801020+Track+colorbox+as+pageview.patch1.41 KBhass
PASSED: [[SimpleTest]]: [MySQL] 179 pass(es).
[ View ]

Comments

hass’s picture

hass’s picture

Status:Closed (duplicate)» Active

Reopen and split cases.

hass’s picture

Title:Do not track Colorbox and other overlays as downloads» Track colorbox as pageview
hass’s picture

Status:Active» Needs review
StatusFileSize
new1.41 KB
PASSED: [[SimpleTest]]: [MySQL] 179 pass(es).
[ View ]
hass’s picture

hass’s picture

Version:7.x-1.x-dev» 6.x-3.x-dev
Status:Fixed» Patch (to be ported)
hass’s picture

Status:Patch (to be ported)» Needs review
StatusFileSize
new1.4 KB
PASSED: [[SimpleTest]]: [MySQL] 149 pass(es).
[ View ]

Patch

hass’s picture

Plazik’s picture

Title:Track colorbox as pageview» Track modal dialogs scripts as pageview
Version:6.x-3.x-dev» 7.x-1.x-dev
Status:Fixed» Needs work

There are many modal dialogs scripts (Lightbox, Colorbox, Fancybox, ThickBox, piroBox etc). Why Google Analytics module allow to track only Colorbox events as pageview? It's hardcoded in js file. What should I do if I don't want to track thise events as pageview?

I think the module needs a filed in settings where I can put jQuery selecters to track as pageview. Because some module don't add a special class names in code (like Colorbox). They use jQuery selecters (for example, Fancybox).

hass’s picture

I'm not using any of the other modules any longer and the number of users is very low for this modules. Fancybox and thickbox are more or less dead as I know. Lightbox has a lot of old D6 users, but not so many for D7 and development seems to be stale, but I could be wrong. Just my feeling...

I'm fine with implementing others, but at least for lightbox I have not found any details how we can hook into it like we can in colorbox. However if you can share a clean patch like the colorbox integration we can integrate it.

Deadline is 30th October...

Plazik’s picture

Status:Needs work» Needs review
StatusFileSize
new3.73 KB
PASSED: [[SimpleTest]]: [MySQL] 182 pass(es).
[ View ]

Fancybox module is in active development. I used 7.x-2-x branch for testing.

I made a filed in GA module admin interface for adding jQuery selector which GA track as page views.

Advantage:
Works for all modal-dialogs script.

Limitation:
Work as click on image.

hass’s picture

I'm in favor of such a solution, but "cbox_complete" seems to be a special event and if you click through a colorbox gallery you will not be able to track the forward buttons or better to say the images loaded with colorbox in a row. You will only see the first loaded with your solution. I think this does not work well.

hass’s picture

Status:Needs review» Needs work
Plazik’s picture

There are some callback functions for others modal-dialogs scripts:
Fancybox onComplete http://fancybox.net/api
Fancybox2: afterLoad http://fancyapps.com/fancybox/#docs
Shadowbox onFinish http://www.shadowbox-js.com/options.html
YoxView onOpen() http://www.yoxigen.com/yoxview/usage.aspx

Anyway, it should be checkbox or list of checkox for people who don't wont to track this as page views.

hass’s picture

Are you volunteering for the integration of all these modules?

Plazik’s picture

I think not.

bofrost’s picture

How can I check if the colorbox tracking works?

hass’s picture

  1. Open network view in chrome/firefox development tools
  2. click on an image with colorbox
  3. tracking fires to google
  4. every hit on forward buttons in the colorbox will fire another pageview to google.
bofrost’s picture

It seems to work... thanks

drupalina’s picture

Since Lightbox2 is a very popular module, I think it would would be useful that images opening in a Lightbox are also tracked as a separate pageview. Is there work going on to implement this in GA module?

philsward’s picture

Is this why I'm getting stupid high page views? Is there any way to disable this outside of turning off event tracking for files (which is nice to know info)

I fail to understand why any one would want to count an image view as a page view... Anyone want to clarify this logic for me? Thanks!

drupalina’s picture

@philsward there are many reasons. One such reason being SEO and SEPRO. It is known that with time Google tends to lower the SERPs for websites with high bounce rates (the logic being "if the website is showing high bounce rateit means that users are not getting the desired information"). However, one of the websites that I'm managing suffers from this although the way that the pages are organised is that they present a lot of content all on one page with Lightbox pictures, ajax accordions, quicktabs etc. Basically, these are organised to be is a one-stop info pages. If browsing through Lightbox pictures would decrease the bounce rate dramatically then that website is likely to begin gaining it's search results page ranking.

philsward’s picture

@drupalina IMHO "pages" should be tracked as "page views" and images should be tracked as events. You bring a visitor to a page to perform a specific event (ie look at an image) not the other way around.

Regarding the "High Bounce Rate affects SEO" theory...
http://www.kingmoney.net/seo/high-bounce-rate-not-affects-position

(Just frustrated to have tens of thousands of page views skewing the true Analytics data...)

hass’s picture

Status:Needs work» Fixed

Looks like nobody is interested in working on this. Closing.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary:View changes

a

hansfn’s picture

It's unclear to me if this fix is included in 7.x-1.4? It's not listed in the notes, but I assume it's indeed fixed. If it is, maybe update the notes?

OK, I see that it was already included in 7.x-1.3. Hm, I have to check why it doesn't work for me. (I'm using colorbox.)

Added: I'm using Colorbox Node - sample code:

<a class="colorbox-node init-colorbox-node-processed-processed" href="/somepath">Some title</a>

You can see it in action on himoldex.no - the "1XY Forelesning" links. Should I open a new issue, or can we reopen this one? Is there a trivial fix?

cgmonroe’s picture

Issue summary:View changes
Status:Closed (fixed)» Postponed

This issue is marked as fixed and has several patch version. Fixed implies that the patch was accepted and is now in the code base.

However, the notes for when it was marked "fixed" was that this was done of no activity and not because the patch was included.

Re-marking this as issue as postponed since that does not imply the code as been added. A maintainer can always re-mark it as "won't fix" if that seems like the right state.

hass’s picture

Status:Postponed» Closed (fixed)

#7 has been committed.

cehfisher’s picture

The patch on #7 is for D6. The ticket was originally for version 7.x-1.x-dev
I recently installed the dev version of this module for D7 and the patch in #11 was not included

hass’s picture

Colorbox support is in the module, others not. The patch from #11 is not working as noted. If you'd like to work on the remaining issues, write the patch and open a new case and I will review it. The issues are discussed in #12+. There was over one year nobody who wrote the patches and I will not spend time on modules I'm not using myself and I'm not getting paid for. If you cannot write code yourself you can pay me for doing it for you.

ssoulless’s picture

Status:Closed (fixed)» Reviewed & tested by the community

I reopen the issue, patch #11 should be commited to 7.x-1.x

hass’s picture

Status:Reviewed & tested by the community» Closed (fixed)

#12, #24 and 1.x is EOL

ssoulless’s picture

Ok so is this feature "count colorbox opens as pageviews" implemented in all the current stable releases? including 7.x-2.x ?

hass’s picture

Read release notes of 1.x and project home.