Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report using filter that contains a variable value #22

Open
GhitaB opened this issue Jun 12, 2015 · 1 comment
Open

Report using filter that contains a variable value #22

GhitaB opened this issue Jun 12, 2015 · 1 comment

Comments

@GhitaB
Copy link
Member

GhitaB commented Jun 12, 2015

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:
image
to this table (and correct values, too):
image

@GhitaB
Copy link
Member Author

GhitaB commented Jun 16, 2015

@macagua Have you any idea here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant