Closed (duplicate)
Project:
Crazy Egg Integration
Version:
7.x-1.0
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Oct 2011 at 18:01 UTC
Updated:
10 Mar 2018 at 13:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
yannisc commentedYou can select which pages to track from within the crazy egg dashboard. Having the tracking code installed on all pages doesn't do any harm other than the not needed loading of the javascript file.
I agree that being able to select on which pages to have the js injected would be a nice option.
Comment #2
noahlively commentedCurious for some more feedback on this. I can certainly add the option, but is there really a compelling reason to?
Comment #3
gregglesIncluding javascript on pages you don't care about increases the page load times unnecessarily. It would be better to only include it where strictly necessary.
Comment #4
philsward commentedTotally agree with greggles. Anywhere we can reduce the amount of stuff loaded on a page is a good thing.
I guess the question we need to ask is: "what's the impact of the loaded js?" If it's only a few lines of code injected at the bottom, I can see where there's no point in worrying about it. But, if its calling on a js file somewhere, that's one additional request per page that may not be necessary.
I personally haven't dove into the module to know one way or the other, just throwing out some thoughts.
Comment #6
philsward commentedOk, I'm going to have to chalk this one up as a "must have"... When the crazyegg module is enabled, I see some fairly high "wait times" for many of the pages. Wait times of 1.5 - 3+ seconds (Basically waiting on a response from the server) which then leads to the actual download of the content, an additional 1 - 2.5 seconds. One of my views pages is taking over 7 seconds to load.
Disable the crazyegg module and my wait times drop to ~500ms with fully loaded page times between 1 - 2 seconds.
Based on what I'm seeing with the loading, I don't see anything specific pointing to the crazyegg module as the root cause, but If I disable the module, the pages load pretty quick. If I enable it, they slow down...
At this point, I'm left with the choice of "slow website" and collect data or "fast website" and just cancel my 30 day trial... I'm ramping up for my busy season and really can't afford to have key pages (that aren't being tracked by crazyegg) affected by slow load times.
---
Would it be worth the effort to also locally cache the .js?
Comment #7
k-mo commentedHere is a patch, What it does:
U should grant admins the following permission for full control:
If u want a certain role to be able to edit the page visibility give him the following permissions:
When u go to the crazyegg settings page (admin/config/system/crazyegg) u will see a new tab pages (works like block visibility). PHP filter can be added if wanted.
Feedback is welcome :)
Caching the file is possible but not included in this patch.
Comment #8
k-mo commentedSorry typo, use this patch
Comment #9
k-mo commentedFinal
Comment #10
Anonymous (not verified) commentedThanks, patch working ok for me, re-rolled patch with --relative.
Comment #11
fullerja commentedPatch in 9/10 works for me. Re-rolled to apply cleanly from module root, rather than modules directory
Comment #12
fullerja commentedComment #13
aklump commentedPlease roll this patch into a 1.1 release or at least into the 7.x-1.x branch. I'd be happy to be a co-maintainer if you'd like.
Comment #14
aklump commentedHere is a patch against the 7.x-1.x branch 921fee5fe043b7dc72135b147a48998995516300. It's based on #11 but replaces drupal_add_js with #attached. Also I couldn't get #11 patch to work completely (1 hunk failed).
Comment #15
damienmckennaThis fixes some coding standards mistakes.
Comment #16
kyletaylored commentedWould it be worth reviewing this other ticket instead in favor of simplicity? For example, this issue adds two additional permissions. Is that really necessary? This is a fairly basic module that is replacing simple script embed, and just seems like a lot of overhead.
#2746447: Add page specific crazyegg listing
Comment #17
crazyegg commentedThank you everybody for participating in this conversation.
However, as @kyletaylored correctly pointed out, the proposed solution would bring some overkill in this basic module, potentially leading to more issues and requiring more time for testing. So we're going to close this issue in favor of simpler solution suggested here: https://www.drupal.org/project/crazyegg/issues/2746447
Basic page-specific targeting was added to 7.x-1.x branch and will be officially released soon.
Comment #18
crazyegg commented