Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On September 18, 2012 , there was a new release of Google Analytics API, with 40+ new data points. The new dimensions and metrics are listed here. The google_analytics_views module should be updated to display the new dimensions and metrics as fields.
Comment | File | Size | Author |
---|---|---|---|
#27 | google_analytics_views-update_datapoints-1796034-27.patch | 178.2 KB | Plazik |
#8 | google_analytics_reports-newdatapoints-1796034-8.patch | 11.17 KB | anniegreens |
#2 | google_analytics_reports-newdatapoints-1796034-2.patch | 11.17 KB | mikeprinsloo |
#1 | google_analytics_reports-newdatapoints-1796034-1.patch | 11.17 KB | Anonymous (not verified) |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #2
mikeprinsloo CreditAttribution: mikeprinsloo commentedA couple of single quotes weren't escaped properly.
Comment #3
BrightBoldThank for this!
Don't you need to escape the apostrophes in "user's" for the descriptions of ga:socialActivityUserPhotoUrl and ga:socialActivityUserProfileUrl?
Comment #4
twardnw CreditAttribution: twardnw commentedgetting LOTS of whitespace errors from patch in #2
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedI see the errors too. I suspect that the patch author used some PHP scripting to generate the code from another source.. perhaps the API reference guide? There are blank spaces after the array operator => which is something I recognize from var_dump().
Regardless, the patch can be applied without error. And I'm using it with success.
Comment #6
midlake CreditAttribution: midlake commentedWait... what? Does the latest release of the module contain the patch, or do we need to apply it ourselves? And if so, how?
Comment #7
MrPaulDriver CreditAttribution: MrPaulDriver commentedIt would be good if the patch could be committed to dev. It's been a while now
Comment #8
anniegreens CreditAttribution: anniegreens commentedCleaned up patch from #2 attached.
Comment #9
pinkonomy CreditAttribution: pinkonomy commentedIs this patch on the dev version?If not,which module should I apply this?
Comment #10
nickdb93 CreditAttribution: nickdb93 commentedCan we get pinkonomy's question answered for the annuls of Google?
Comment #11
BrightBoldPatches should always be for the dev version.
To answer midlake's question, this page on how to apply a patch on Windows offers a great introduction, which you can modify (and which will actually be much easier) if you're on Mac.
Comment #12
JadH CreditAttribution: JadH commentedPatch from #8 is returning the below
Comment #13
Plazik CreditAttribution: Plazik commentedThe patch from #8 is incomplete. There are a lot of changes in datapoints since the time when patch was posted.
See:
There is a new category "Calculated Metrics" in addition to "Dimensions" and "Metrics". Some datapoints are deprecated.
Comment #14
JadH CreditAttribution: JadH commentedI am working on this file with all the updates including the label and the description of each datapoint.
I will share it by next week.
Comment #15
Plazik CreditAttribution: Plazik commentedI think we should keep deprecated datapoins to prevent problems with update from dev version.
Comment #16
JadH CreditAttribution: JadH commentedI had them removed, but I will reinsert them in this case.
Comment #17
JadH CreditAttribution: JadH commentedPalzik, would it be worth adding a Status to each datapoint? in order to know which one was deprecated or not? and maybe add the replaced by also?
What do you think?
Comment #18
Plazik CreditAttribution: Plazik commented@JadH, yes, I think we have to add Status and the replaced by but only for deprecated datapoints.
Comment #19
Plazik CreditAttribution: Plazik commentedComment #20
Plazik CreditAttribution: Plazik commented@JadH, it has been more than week since comment #14 so I've started to write the patch by myself.
Comment #21
JadH CreditAttribution: JadH commented@Plazik, I am really sorry, got stuck at work.
I will email you what I have done so far.
All is included, what remains is the below:
1- Doubleclick
2- Reinsert Deprecated datapoints
-- UPDATE --
I emailed it to you on your gmail, check your spam if you don't see it
Comment #22
Plazik CreditAttribution: Plazik commented@JadH thanks, I got it.
But I've finished my patch too (with all datapoins: Doubleclick and deprecated). It needs some test. I'll post it in a few days.
Comment #23
Plazik CreditAttribution: Plazik commentedcalculation
key to datapoints array with calculation formula.Datapoints with custom
(n)
number (goal(n)Value, ga:customVarName(n), etc) replaced withXX
number (ga:goalXXValue, ga:customVarNameXX) so we also need a update pach.Comment #24
JadH CreditAttribution: JadH commented@Plazik, regarding the the Datapoints with custom (n) number (goal(n)Value, ga:customVarName(n), etc) replaced with XX number (ga:goalXXValue, ga:customVarNameXX) so we also need a update pach, I already did them and they are in the file I have sent.
Due to this change, I suggest that the custom reports in the module should be change, visits should be replaced by sessions and visitors with users.
Comment #25
Plazik CreditAttribution: Plazik commented@JadH, I mean update patch with hook_update_N, where all datapoins with
(n)
will be converted into datapoints withXX
in existing views.We should open another issue to this.
Comment #26
Plazik CreditAttribution: Plazik commentedPatch from #23 with addition features:
(n)
in name into datapoins withXX
.ga:ROI
,ga:margin
,ga:isMobile
,ga:isTablet
don't have new equivalents.Don't forget to clear the cache and run
update.php
!Comment #27
Plazik CreditAttribution: Plazik commentedSmall changes:
Old:
New:
Comment #28
Plazik CreditAttribution: Plazik commentedComment #30
Plazik CreditAttribution: Plazik commentedComment #31
Plazik CreditAttribution: Plazik commentedThe next step is removing all datapoins from code and grabbing it from Google server https://www.googleapis.com/analytics/v3/metadata/ga/columns?pp=1.
See #2373151: Support Google Analytics Metadata API.