First: thanks for this great module, really saved me a lot of time in an event tracking implementation for one of our clients.
Second: One of my co workers (Analytics expert with zero programming experience) wanted to be able to setup all sorts of event trackers without having to learn how to write modules and commit them in our git repo's, deploy to various environments and so on... So I basically made him a small module and called it the google_analytics_et_ui module. I allows him to setup the $selectors array with a graphical user interface. It's based on the admin form from the cufon module.
This is still in internal development and testing for now but we should able to have a first alpha release out pretty soon. (if testing doesn't go horribly wrong)
Would you be interested in including this as a submodule? Or am I better of making this into a standalone project? (I was thinking submodule)
| Comment | File | Size | Author |
|---|---|---|---|
| #31 | google_analytics_et-user_interface_submodule-1994320-31.patch | 27.39 KB | mqanneh |
Comments
Comment #1
frobI am very interested in including a ui sub module.
I would like the complete git history if I could. Could you push the code to a sandbox project so I can pull that into the et (event tracking project).
Comment #2
weseze commentedGreat to hear that. I'll try to push it to a sandbox project this week. (if time allows me)
Comment #3
frobif you wont have time to create the sandbox, you can still attach a patch.
Comment #4
weseze commentedSorry, very very, very busy for the moment.
I've attached a zip with the module so you can take a look. I'll probably won't have (much) time the coming 2 weeks. So you have plenty time to take a look and provide feedback.
Comment #5
frobI have commit this to another branch. I haven't tested the code yet though.
Comment #5.0
frobmade my thinking clearer.
Comment #6
frobIf you want to contribute to this branch please check out the code here
https://drupal.org/node/1342560/git-instructions/7.x-1.x-admin-ui
Comment #7
ultimikeI'm investigating using the UI from comment 4 above as well. If all goes well, I'll go ahead and get the process started to get it included in a future version of this module.
Thanks,
-mike
Comment #8
frobuliimike, I think that is where the admin ui branch of the project comes from. I would want you to start there.
Comment #9
ultimike@frob,
I've gone ahead and created a patch for the 7.x-1.x-admin-ui branch that contains the following changes:
I should note that I rebased the 7.x-1.x-admin-ui on top of the current 7.x-1.x branch locally before starting, although I'm pretty sure the patch will apply without the rebase as well.
Patch attached.
Note that this patch won't apply to the 7.x-1.x branch and will therefore not pass the automated d.o. tests unless it runs against the 7.x-1.x-admin-ui branch...
Thanks,
-mike
Comment #11
ultimikeI've updated the patch from comment 9 with a few additional changes:
I've incorporated most of patch 7 from #1778250: Allow Tokens from other DOM elements. This allows site admins to specify custom replacement tokens (no, not [those tokens](https://drupal.org/project/token)).
I've fixed the sanitization function for selectors.
I've added a text area to the UI to allow site admins to enter custom tokens.
I still can't set the version of this issue to 7.x-1.x-admin-ui (so that the automated tests will run), as it is not one of the options. That being said, a large organization is testing this patch and functionality and I'll update the patch as we progress, if necessary.
Thanks,
-mike
Comment #12
jlockhartWish I would have seen this before beginning my work :) I've created a UI submodule as well, with the difference mainly being that it is entity based rather than using the variables table. Our sites will be creating a great number of tracking arrays and we were concerned about performance in the variables table. I'm offering this as an alternative or we could work on combining the best of both submodules.
Comment #13
frobMy only issue with it being entity based is that it then becomes content. A ctools exportable version would be better. I used the variable table because strongarm makes that easy to export.
A simpler solution would be to break this up across more variables. How many is a great number?
Comment #14
jlockhart@frob For my part the reason I chose an entity approach is specifically because I do see these as content. My thinking is that they are directly related to other content on the site (links, images, etc) and so will be maintained by the site owners rather than implemented by site builders/developers. At least thats how we intend to use them; allowing site owners to create these as needed as they create content. Having them as an exportable for Features was also something we were specifically avoiding; for instance we wouldn't want to have them back ported down to our stage or dev sites as committed features and potentially confusing the event tracking information.
Seems like 2 very different approaches/implementations for this; is there a way to accomplish both?
Comment #15
frob@jhenson
Lets move this into another thread. I wouldn't want this hyjack the work that has already been done on the existing architecture.
Comment #16
frobComment #17
jelle_sAs said in #2345665: Discuss the possibly of moving et from variables into entities.: CTools exportables are preferred over entities.
This patch is based on the 7.x-1.x-admin-ui branch and contains:
google_analytics_et.api.phpwith the new hook definitions.Still to do:
I ran out of time to work on this, so anyone can feel free to take over and write the updates.
I tested this patch with the following steps:
Comment #20
jelle_sMaybe I should have added the patch... ;-)
Comment #21
frob@Jelle_S, I am sorry I need to clean up this repo a bit. Can you please reroll this patch based on dev? admin-ui was only used to ease the testing and I am not sure out of sync it is with dev at this point.
Comment #22
mqannehComment #23
mqannehRerolled branch 7.x-1.x-admin-ui and most recent patch against the latest dev version.
Comment #25
mqannehFixed coding standards issues.
Comment #26
mqannehComment #28
mqannehComment #29
biigniick commentedi'm having some issues trying to get this to work. either i don't know what i am doing (entirely possible), or something is broken. upon applying the patch, i get this error:
Fatal error: Call to undefined function ctools_include() in .../sites/all/modules/google_analytics_et/google_analytics_et.module on line 64the patch wouldn't apply to the UI branch, so i attempted the 7.x-1.x-dev branch and it patched but gave the white screen errori really would like to get this module working on a site i have! thanks for all the work. let me know what i can do to help.
EDIT: i downloaded and enabled ctools. we should add it to the dependencies. still working on getting this to work...
Comment #30
mqanneh@BiigNiick
will you please send me the drupal core and the.module versions plus the full error messages.
I have this patch applied and work on a production site with no issues.
Comment #31
mqannehRerolled the patch to fix some coding standard issues.
@BiigNiick I think that you didn't enable the new submodule google_analytics_et_ui which has ctools as a dependency. That's why you got the ctools code error.
The objective of this patch is to add google_analytics_et_ui submodule.
Comment #33
mqannehSwitching issue status into Needs review since the patch test results failed for the dependency google_analytics and passed for this patch.
check http://www.drupal.org/pift-ci-job/842330 for more details.
Comment #34
biigniick commented@mqanneh, i'm finding it may have been that a client's purchased a theme that was (among other things) overriding jQuery and making js things break. i think it's working as designed, but i don't have it up and working properly yet... thanks for the response.
Comment #36
frobI have set a retest on php 5.6, I am thinking it might be a php version issue over on the GA side. Using [] syntax instead of array()
Looks like the GA dev module is fixed. http://cgit.drupalcode.org/google_analytics/commit/googleanalytics.test?...
If I can get one RTBC on this patch then I will commit it and at least this will be in dev. I don't use this module any more as I am no longer in an industry that benefits from the type of broad AB testing that this module provides, thus I do not have a site to test this on.
Comment #37
m.abdulqader commented@fob I'm using this patch on a production site with no issues. Looks like the automated test result errors are related to php version as you mentioned,
The error is raised from google_analytics module and it's not related to this patch.
PHP Parse error: syntax error, unexpected '[' in /var/www/html/sites/all/modules/google_analytics/googleanalytics.test on line 512Comment #38
frobOkay, so I spoke too soon. I just reviewed the patch. Why does it change id to name. As far as I can tell this patch shouldn't edit the js at all.
Comment #39
frobWhile at DrupalCon Nashville I got to review this patch much more closely. In order for this patch to be accepted it must make no changes to the existing js and module file. Not that the changes are not good, it makes too many of them and most of them are out of the scope for this patch.
The reason for this is to maintain backward compatibility with the existing api. This means also maintaining backward compatibility with dependencies. This patch would make ctools a dependency of both the ui and the api.