collective / collective/collective.googleanalytics
Report using filter that contains a variable value
- Dominant language
- Python
- Stars
- 4
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
I have a question. I need a custom report that uses a filter containing a word. How can I define this in Table Rows Expression?
In GA I have: Only show [custom dimension 1 name] Containing [word]
and in Query Explorer I solved using: filters: ga:dimension1=~(word)
In collective.googleanalytics I have now:
Table Rows Expression: python:[row, metric('ga:totalEvents', {'ga:dimension1': row})]
and this returns correct value only when ga:dimension1 == row. I need ga:dimension1 containing row value, but I have no idea how to set this.
This is related to: http://stackoverflow.com/questions/30782980/collective-googleanalytics-report-with-filter-containing-tag
and: http://stackoverflow.com/questions/30776388/ga-query-to-return-unique-count-number
I encountered this problem trying to solve this problem:
I save multiple tags in a custom dimension and I send events for them. I need a custom report that contains each unique tag and the total events for it.
To extract unique tags from registered custom dimension values I use in collective.googleanalytics:
Table Row Repeat Expression: python:[e for i, e in enumerate([item for sublist in dimension('ga:dimension1') for item in sublist.split(",")]) if [item for sublist in dimension('ga:dimension1') for item in sublist.split(",")].index(e) == i]
Is there a solution to fix condition ga:dimension1': row analog to 'containing'?
Or have you any idea how can I solve my report with other settings?
Maybe this will help:
I want to convert this simple one:

to this table (and correct values, too):

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.